• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retaining selected value in html:select on page refresh

 
Thillai Sakthi
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Amit KumarS
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess u need to write scope="session" in your action tag of struts-config.xml file.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic