This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

retaining selected values.....list box

 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All

I am using the following code in my JSP page
<html:select property="items" size="4" multiple="true">
<html ptions name="TestForm" property="items" labelProperty="items"/>
</html:select>

I am using form and DTO getItems() and setItems(). Thransfering the data from the DAo to DTO and assigning to form in the action class using BeanUtils.copyProperies() method.

In the initial page load, all the items are displayed, highlightinh all values selected. That's fine. Based on the selected items, I am doing a search and the results are displayed in a seperate tab in the same page.

problem:

when the user goes back to the selection page, the previous selected items are to to be retainined.

How can I do this??

Thanks in advance.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the solution from this website:
http://www.coderanch.com/t/46409/Struts/html-options-horrible-default-settings

Thanks to 'Junilu Lacar' for clearing my funda.
 
Don't mess with me you fool! I'm cooking with gas! Here, read this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!