You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2005/12/16 18:52:27 UTC
ILink or IPage
Hi!
What is the difference between returning an ILink or an IPage on a listener?
And how do I get hold of an ILink? The IPage I can inject or get from
the cycle..
--
/ted
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: ILink or IPage
Posted by Glen <gl...@model3.net>.
I have just implemented redirect on update functionality (I am
converting an existing webapp to tapestry and need this) which turns out
to cover these two topices.
An ILink will cause a redirect url to be sent to the browser (via
HttpServletResponse.sendRedirect()). An IPage will be rendered in the
current request cycle.
Here is a snippet of code to get an ILink to a page that implements
IExternalPage...
String pageName = "MyPage";
Object[] parms = new Object[] { "parm1", "parm2" };
IEngineService externalService = getEngine().getService(
Tapestry.EXTERNAL_SERVICE );
ExternalServiceParameter externalServiceParameter = new
ExternalServiceParameter( pageName , parms );
ILink iLink = externalService.getLink( false,
externalServiceParameter );
Note: This code is works with tapestry4.0-rc-1
Ted Steen wrote:
> Hi!
>
> What is the difference between returning an ILink or an IPage on a listener?
> And how do I get hold of an ILink? The IPage I can inject or get from
> the cycle..
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org