my dog learned polymorphism*
The moose likes JSP and the fly likes Retain the combo box value when the page is revisited Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Retain the combo box value when the page is revisited" Watch "Retain the combo box value when the page is revisited" New topic
Author

Retain the combo box value when the page is revisited

pratyusha vemulapalli
Greenhorn

Joined: Jan 05, 2009
Posts: 1
this is my jsp code, now I want the value that I have selected earlier to be reselected when I hit the Back button in my next page.

<form:select id="getAddress" name="getAddress" path="" >
<c:forEach items="${addresses}" var="addresses">
<form:option value="${addresses.key}" label="${addresses.value}" ></form:option>
</c:forEach>
</form:select>


Can you please help in how to go ahead with this problem. Looking forward for a solution that woulld clear my trouble.

Thanks in advance
Pratyusha
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
"Back Button"..... refers ?

Are you referring this Back button to

"Browser back button"

or

"Button provided in your own JSP"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61082
    
  66

That's not a "combo box". Using correct terminology is important. Please read HtmlHasNoComboBox.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Retain the combo box value when the page is revisited