You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@comcast.net> on 2003/08/25 16:13:10 UTC
RE: DirectLink to another page or a redirect from Java code
You need to activate the other page, using IRequestCycle.activate().
Typically, it looks like:
OtherPage other = (OtherPage)cycle.getPage("Other");
other.setFoo(...);
other.setBar(...);
cycle.activate(other);
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry
http://jakarta.apache.org/commons/sandbox/hivemind/
http://javatapestry.blogspot.com
> -----Original Message-----
> From: Mindaugas Genutis [mailto:mindaugas@elinara.ktu.lt]
> Sent: Monday, August 25, 2003 11:07 AM
> To: tapestry-user@jakarta.apache.org
> Subject: DirectLink to another page or a redirect from Java code
>
>
>
> Hello,
>
> I have a DirectLink in my page that tells me which user to
> edit. In the
> method of the java class for that page I handle this click:
>
> public void editDirectListener(IRequestCycle cycle)
> {
> Object[] arrDirectParams = cycle.getServiceParameters();
>
> Object objObjectUID = (Integer)arrDirectParams[0];
>
> // Now print a form with fields?
> }
>
> However, what I want to do is print another page that
> displays fields for
> that user. How to redirect my 'Edit' request to another page? I can't
> figure out how to do it from Java. Also, I can't find a way
> to do that
> directly from DirectLink.
>
> A solution might be to put another page as a listener for the
> DirectLink.
> But how to do that?
>
> Thanks,
>
> --
> Kaunas Regional Distance Education Center
> Programmer
> Phone: +370 674 05232
> WWW: http://distance.ktu.lt
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>