This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Retaining selected value in html:select on page refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Retaining selected value in html:select on page refresh" Watch "Retaining selected value in html:select on page refresh" New topic
Author

Retaining selected value in html:select on page refresh

Thillai Sakthi
Ranch Hand

Joined: Jun 17, 2000
Posts: 102
Hi friends:
I am very new to struts. Need your help urgently please. I have a single select list. The form needs to be refreshed based on the user selection on this sslist. How do I make the selected value to appear as default selected in the ss list after refresh? For the page to load the first time, "-Select-" needs to be displayed as the default option....



Thanks a lot in advance....

Shakthi


Regards,
Shakthi
Amit KumarS
Ranch Hand

Joined: Oct 10, 2003
Posts: 100
i guess u need to write scope="session" in your action tag of struts-config.xml file.


****************************<br />In 24 hrs Earth rotates once on its Axis.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retaining selected value in html:select on page refresh
 
Similar Threads
html:option selected
How can I add more text input base on users selection
html:select problem-------
how to set option to default ?
how to fill a combobox with values from objects in an ArrayList...