aspose file tools*
The moose likes JSP and the fly likes Retaining Retaining  Drop down value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Retaining Retaining  Drop down value" Watch "Retaining Retaining  Drop down value" New topic
Author

Retaining Retaining Drop down value

LakshmiNarayana vishnu
Ranch Hand

Joined: Aug 03, 2006
Posts: 39
Hi,

In my jsp page i am having 2 drop downs.after selecting first drop down value,which is coming from DB then request go to controller to fetch the second drop down box value and back to the same JSP...While it is coming back i have to retain my 1st drop down value as well as other field values...

Please Help me on this...

Thanks in Advance,
Narvish
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
If you post the values to the controller they will be avialable to pass to the JSP.
LakshmiNarayana vishnu
Ranch Hand

Joined: Aug 03, 2006
Posts: 39
I am not getting...any help..

Regds,
Narvish
Michael Ku
Ranch Hand

Joined: Apr 20, 2002
Posts: 510
Please explain what you are having trouble with. The selected value from the first drop down will be posted. Then you just set it as the selected value when you visit the JSP the second time.

What have you done so far?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Retaining Retaining Drop down value
 
Similar Threads
disable one of the option
Retain Drop Down menu values on "Back"
How to retain the value of drop down on click of browser back button
Drop down list value
How to retain value in struts 2 using <s:select></s:select> tag