You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Harland <ha...@yahoo.com> on 2007/04/30 12:08:32 UTC
Dynamic back button
Hi,
I have a page that can be reached from various other pages. On this page is a button that will send them back to the page they came from via the action for that page. Is there a clever way of doing this with struts 2 other than putting a hidden variable in the page to check.
Thanks
Dave.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Dynamic back button
Posted by Lance <la...@marketpipe.com>.
There are a couple of tricks
1. The referring page can be found in request.getHeader("referer")...
the referring page's request parameters can not be found though so this
will probably not work.
2. You can implement a javax.servlet.Filter
This pushes and pops pages (and their parameters) to a stack.
Pop occurs when back is clicked
When the user chooses an option from the main menu, you clear the stack
Back button (tag??) uses stack.peek(1) to get the prev page and it's
parameters.
David Harland wrote:
> Hi,
>
> I have a page that can be reached from various other pages. On this page is a button that will send them back to the page they came from via the action for that page. Is there a clever way of doing this with struts 2 other than putting a hidden variable in the page to check.
>
> Thanks
>
> Dave.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Dynamic back button
Posted by Felipe Rodrigues <fe...@yahoo.com.br>.
Send the url to get back as a parameter.
So you can just use EL in your link or javascript.
Regards,
Felipe
David Harland wrote:
>
> Hi,
>
> I have a page that can be reached from various other pages. On this page
> is a button that will send them back to the page they came from via the
> action for that page. Is there a clever way of doing this with struts 2
> other than putting a hidden variable in the page to check.
>
> Thanks
>
> Dave.
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Dynamic-back-button-tf3668831.html#a10253715
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org