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<use...@laliluna.de> wrote:
> Thiago H. de Paula Figueiredo schrieb:
>>
>> Em Thu, 06 Aug 2009 07:35:17 -0300, Sebastian Hennebrueder
>> <use...@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-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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

Reply via email to