Hi Fernando.

You'll want to write an ILinkRenderer to pass to the ExternalLink.
I've only got the Tapestry 3 source handy so I'm not sure about 4,
but it should be similar.

Grab framework\src\org\apache\tapestry\link\DefaultLinkRenderer.java
and rename it to a new class in your project. I recommend you declare
and use a static instance in the class itself as it does already:

    public static final ILinkRenderer SHARED_INSTANCE = new 
DefaultLinkRenderer();


You'll need to modify:
    protected String constructURL(ILink link, String anchor, IRequestCycle 
cycle)
    {
        return link.getURL(anchor, true);
    }

Looks like you can use link.getAbsoluteURL(...) to override the scheme.
Then pass YourLinkRenderer.SHARED_INSTANCE to the ExternalLink.

HTH

Cheers,
Nick.


Fernando Padilla wrote:
Hey.  So I was wondering if there was an easy way to point an
ExternalLink to a different protocol.

We want to have most of the site be in HTTP, except the credit card
entry page, that should be HTTPS.

options? ideas? discussion?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to