File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
back button issue...
Joined: Oct 27, 2009
Dec 07, 2009 22:24:58
I have a user defined back button...
is load project.jsp...
i select a project and click 'OK' to go to vocabulary.jsp... here, based on the project selected I am populating rows in vocabulary.jsp(using s:iterator)
I can also add a new row in this jsp.After this I have a button called 'RS' to go to RS.jsp.
Now,in RS.jsp I have a user defined back button.When I click on it i need to go back to vocabulary.jsp and it showing vocabulary.jsp a blank rather it should show the values.
what should be done here to show the vocabulary ,jsp as it was before clicking on 'RS' button?
Is it the problem with the s:iterator??
In loadproject.jsp I have the ArrayLists and these are used in vocabulary.jsp viz...
vocabulary.jsp ITERATOR! <s:iterator value="vIDList" status="posi"> <tr> <td><s:property value="vIDList[#posi.index]"/></td> <td><s:property value="conList[#posi.index]"/></td> <td><s:property value="atrList[#posi.index]"/></td> <td><s:property value="dtypeList[#posi.index]"/></td> </tr> </s:iterator>
ArrayList vIDList; ArrayList conList; ArrayList atrList; ArrayList dtypeList; with getters...
Is the framework not recognizing the Arraylists on back button click? it looks for all the actions registered in struts.xml isn't it? and i dont have duplicate names either!
In the output i could see the values of all 4 ArrayLists on click on back button but not in my jsp(UI)...
Hope I am clear!
hung vu quang
Joined: Dec 22, 2009
Dec 22, 2009 09:18:15
It is not because of framework, html could not cache object such as your list so when you when back, only directly attribute could be kept.
So in this case you have to re-submit this page to get your arraylist agian.
Don't get me started about those stupid
subject: back button issue...
Need to create dynamic <s:property tag using <s:iterator
RadioButton with List Struts 2
Struts 2 iterating enums
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015