struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Mouchritsas <dimitris.mouchrit...@eurodyn.com>
Subject Re: Implementing a back button without Javascript
Date Wed, 19 Mar 2008 13:30:53 GMT
Antonio Petrelli wrote:
> 2008/3/19, Dimitris Mouchritsas <dimitris.mouchritsas@eurodyn.com>:
>   
>> we're using struts 1.2.4 in our project and I'm trying to implement a
>> back button for a 3 step registration procedure. The problem is I'd
>> like to do it without using javascript. I've discovered html:cancel
>> which works nicely for ...canceling. But I couldn't find anything similar
>> for the back button. Any ideas?
>>     
>
>
>
> You need to manage it on the server side. There are many ways to do it, just
> to mention a pair:
> 1) the button points to the previous action;
> 2) implement a history manager that manages the history of called actions
> and, when called "back" (e.g. with a "history action") you go back in the
> history.
>
> Ciao
> Antonio
>
>   
The first case would suit me fine. But how would I do this exactly? Use 
a simple button instead of <html:button> and include it in a <a> element?
I'm trying to do this as uniform as possible as with the other buttons 
which are <htm:submit>, <html:reset> and <html:cancel>.
My current code looks like this:        
<a href="<%=request.getContextPath()%>/home.do">
  <html:button styleClass="button" property="back">
    <bean:message key="prompt.back.button" />
  </html:button>
</a>
but I still need to add a back property to the form bean which is not 
really needed.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message