I have no idea why it should be so hard to do redirects. Its such an integral
part of web apps. this Howard guy must be beaten



Benny Law wrote:
> 
> I wish it were built into Tapestry 5 too. It was in previous versions. I
> don't fully understand why Howard took it out, and I don't know of any
> built-in mechanism to abort the current page and redirect to another. I
> guess this is why somebody created the wiki entry. I followed it (with
> some
> modifications) and it works for me.
> 
> Benny
> 
> On Thu, Sep 10, 2009 at 12:54 AM, Xuan Tran Le
> <lexuanttk...@gmail.com>wrote:
> 
>> Thanks you so much. Maybe I have to follow this link:
>> http://wiki.apache.org/tapestry/Tapestry5RedirectException
>>
>> Is there any built-in for this? I think that my problem is rather common.
>> Why don't you make it be a tapestry built-in?
>>
>> On Thu, Sep 10, 2009 at 11:30 AM, Benny Law <benny.mk....@gmail.com>
>> wrote:
>>
>> > I would try something like this:
>> > in B class...
>> >
>> > @PageAttached
>> > private void redirectToC() {
>> >     // ...
>> >     throw new RedirectException("..."); // URL for C
>> > }
>> >
>> > You will need to create RedirectException. I believe there is something
>> in
>> > the wiki on how to handle this exception in AppModule.
>> >
>> > Hope this helps.
>> >
>> > Benny
>> >
>> > On Thu, Sep 10, 2009 at 12:18 AM, Xuan Tran Le <lexuanttk...@gmail.com
>> > >wrote:
>> >
>> > > I'm developing a project in portlet mode and I have a problem with
>> page
>> > > redirect:
>> > > - I have 3 pages named A, B, C.
>> > > - In page named A, I have a page link to page B, then I want B auto
>> > > redirect
>> > > to page C
>> > >
>> > > The problem is that in B class I don't know how to redirect to C. I
>> try
>> > to
>> > > call
>> > >
>> > > ---------- B class -------------
>> > > @InjectPage
>> > > private C c;//page C
>> > >
>> > > Object onActivate() {
>> > >   return c;
>> > > }
>> > >
>> > > ------------------------------------
>> > >
>> > > i don't know in B class which phase (which method) can redirect to
>> other
>> > > page.
>> > >
>> > > I did try add a action link to B, then when A call B, in B I click to
>> the
>> > > action link, then I have C. But I don't want to click page B again. I
>> > want
>> > > to click page A then it call to B and in B it auto redirect to C.
>> > >
>> >
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Redirect-page-tp25377030p29046690.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to