You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Sheridan <ja...@tecnomen.ie> on 2004/07/27 16:51:29 UTC

Back navigation using application back buttons

Hi,

I am trying to implement a simple Back mechanism which uses Back buttons in
the page (encouraging users to use this rather than browser Back which is
not a good idea). Lets call the pages Page1 and Page2. A Page 1 action
brings user to Page 2. Page 2 has a Back button. The basic mechanism is
trivial, ie. an action handler for Page 2 Back which forwards to Page1.
However the problem is I want to be able to go Back to pages other than
Page1 since the user can also get to Page 2 via Page3. ie. I want to be able
to do
	Page1->Page2->(back)->Page1
	Page1->Page3->Page2->(back)->Page3
Is there some way to control the forwarding for the Page2 Back handling and
know which page to go back to ? The 'static' mappings I would set up in
struts-config.xml appear to only allow me to configure navigation back to
one specific page. I was considering implementing a 'page stack' object and
passing it as a session attribute but I would have hoped that the Struts
framework would make this possible in some easy way.

I suppose some of the wizard ideas might help but a wizard is essentially
different from what I cam trying to achieve in the sense that Back in a
wizard always go back to a specific page.

Any help would be greatly appreciated.

-- James


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Asunto: Back navigation using application back buttons

Posted by gm...@fibertel.com.ar.
James:
We are working in an integral components framework and one of the components
is Struts navigation using a non intrusive stack:

We have an early access at http://opentranquera.sourceforge.net/ea/opentranquera-src-0.1-ea.zip

You can take a look at net.sf.opentranquera.ui.struts.navigation package
and the webapp/navigation web app, i know that we lack of documentation
currently, but may it can be of your interest. I think this navigation scheme
solves exactly your problem.

You configure a webapp filter (in web.xml) that intercepts the calls and
saves a stack. in this way you need not to code anything in your actions
(nor extends any superclass) and all is solved in the filter. To go to the
back page, you have to indicate an action in the struts-config and call
it.


Let me know if you have further questions.

Saludos.
Guillermo.

>-- Mensaje original --
>Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
>From:	James Sheridan <ja...@tecnomen.ie>
>To:	"'user@struts.apache.org'" <us...@struts.apache.org>
>Subject: Back navigation using application back buttons
>Date:	Tue, 27 Jul 2004 15:51:29 +0100
>
>
>Hi,
>
>I am trying to implement a simple Back mechanism which uses Back buttons
>in
>the page (encouraging users to use this rather than browser Back which
is
>not a good idea). Lets call the pages Page1 and Page2. A Page 1 action
>brings user to Page 2. Page 2 has a Back button. The basic mechanism is
>trivial, ie. an action handler for Page 2 Back which forwards to Page1.
>However the problem is I want to be able to go Back to pages other than
>Page1 since the user can also get to Page 2 via Page3. ie. I want to be
able
>to do
>	Page1->Page2->(back)->Page1
>	Page1->Page3->Page2->(back)->Page3
>Is there some way to control the forwarding for the Page2 Back handling
and
>know which page to go back to ? The 'static' mappings I would set up in
>struts-config.xml appear to only allow me to configure navigation back
to
>one specific page. I was considering implementing a 'page stack' object
and
>passing it as a session attribute but I would have hoped that the Struts
>framework would make this possible in some easy way.
>
>I suppose some of the wizard ideas might help but a wizard is essentially
>different from what I cam trying to achieve in the sense that Back in a
>wizard always go back to a specific page.
>
>Any help would be greatly appreciated.
>
>-- James
>
>
>**********************************************************************
>This email and any files transmitted with it are confidential and
>intended solely for the use of the individual or entity to whom they
>are addressed. If you have received this email in error please notify
>the sender.
>
>This footnote also confirms that this email message has been swept by
>MIMEsweeper for the presence of computer viruses.
>
>**********************************************************************
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>


________________________________________
FiberTel, el nombre de la banda ancha http://www.fibertel.com.ar



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org