0

I have two pages one is step1.jsp, here the user can input its Function, for example DNF and KNF. The user can select gates or multiplexer, with which the function will be simulated in step2.jsp. Now if the user clicks on "next"-button, he is forwarded to step2.jsp (using Struts2 technologie) where the function is simulated (with gates or multiplexer depending on his choice).

What I want to realize: Throw "back"-button in step2.jsp, when the user clicks on this button, he will be forwarded to step1.jsp and can select "multiplexer" or "gates" again. How to keep the functions, the user has entered in step1, sothat thy can be used again, even after changing to step2.jsp an back to step1.jsp?

4

2 回答 2

1

你可以做一些事情,比如

<s:url value="step1.action" var="backURL">
   <s:param name="selectedFunction" value="name_of_the_function" />   
</s:url>

<s:a href="%{backURL}">Back</s:a>

希望这可以帮助。

于 2012-07-04T10:02:13.137 回答
0

使链接包含预选功能:

<a href="step1.action?function=the_function_you_want_to_preselect>">Back</a>
于 2012-07-04T09:52:57.107 回答