You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sebastian Hennebrueder <us...@laliluna.de> on 2009/08/06 23:26:55 UTC

Re: Link encoded twice (thanks)

Thank you to all of you.

Howard Lewis Ship schrieb:
> Object onActionFromUrlresponse() throws Exception {
>   return new URL("http", "www.lailuna.de", "");
> }
> 
> Tapestry can capture the exception, if any, and wrap it as a RuntimeException.
> 
> On Thu, Aug 6, 2009 at 7:08 AM, Sebastian
> Hennebrueder<us...@laliluna.de> wrote:
>> Thiago H. de Paula Figueiredo schrieb:
>>> Em Thu, 06 Aug 2009 07:35:17 -0300, Sebastian Hennebrueder
>>> <us...@laliluna.de> escreveu:
>>>
>>>> Hello,
>>> Hi!
>>>
>>> To redirect to an external URL, all you need to do is to return a
>>> java.net.URL instance from an event handler method.
>>>
>> Hello,
>>
>> I found this solution as well but the code is really not nice. Same is true
>> for an anonymous implementation of Link.
>>
>> Object onActionFromUrlresponse() {
>>                try {
>>                        URL url = new URL("http", "www.laliluna.de", "");
>>                        return url;
>>                } catch (MalformedURLException e) {
>>                        throw new RuntimeException(e);
>>                }
>>        }
>>
>> What about something like this?
>> @Inject
>> private PageRenderLinkSource pageRenderLinkSource;
>>
>> Link link =
>> pageRenderLinkSource.createUrl("http://www.laliluna.de").addParam("foo","foovalue").addParam("bar","barValue").addAnchor("#bla").build();
>>
>> If the community find this useful and tell me the place where to implement
>> the LinkFactory (pageRenderLinkSource is just an idea), I could code this.
>>
>> --
>> Best Regards / Viele Grüße
>>
>> Sebastian Hennebrueder
>> -----
>> Software Developer and Trainer for Hibernate / Java Persistence
>> http://www.laliluna.de
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> 



-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder
-----
Software Developer and Trainer for Hibernate / Java Persistence
http://www.laliluna.de



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org