struts action quiestion  
Author Message
fera





PostPosted: 2005-7-18 17:20:00 Top

java-programmer, struts action quiestion Hello,

I have a short question concerning struts action context stack. I have 3
views. View A, B and C
To view C, I can get from view A, or B. In view C I have button "BACK",
Whenever I click BACK button, I want to go back to page that called view C
(A od B).
Is there any way to do it (remember calling view), or I have to implement my
own context stack mechanizm ?

thank you,

fera


 
Wendy Smoak





PostPosted: 2005-7-18 21:34:00 Top

java-programmer >> struts action quiestion "fera" <email***@***.com> wrote:

> I have a short question concerning struts action context stack. I have 3
> views. View A, B and C
> To view C, I can get from view A, or B. In view C I have button "BACK",
> Whenever I click BACK button, I want to go back to page that called view C
> (A od B).
> Is there any way to do it (remember calling view), or I have to implement
my
> own context stack mechanizm ?

Everything in Struts is "forward" and it does not have the concept of "where
did I come from". You will need to keep track of where the user has been if
you want to enable 'breadcrumbs' or be able to link back to the prior page.

I haven't used it, but Struts Layout has breadcrumbs:
http://struts.application-servers.com/features/index.html

If your navigation is fairly simple, you can just set a request attribute in
the Action and use that to construct the 'back' link.

I encourage you come join us on the Struts User mailing list if you have
more questions:
http://struts.apache.org/mail.html

--
Wendy Smoak