Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retaining the value in struts2 using Select and optionTransferSelect

 
Gurvinder Rayat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am asking for something which is common, but I am not able to find anything on Google also.
I have successfully implemented Select/OptionTransferSelect Tags, but I am not able to get values in action (which I am calling on submission)
I am looking for some sample code.
Thanks in advance.
Gurvinder

// Thanks for forwarding the links.
I have already implemented the same in way it is mentioned on forwarded links.

<s:select list="modes" multiple="true" name="selectedModes" id="selectedModes" listKey="id" listValue="name" key="mode" cssStyle="WIDTH:200px"/>

I want to know, when I am submitting these values to an action, how to get selected values?
Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both have examples on the S2 documentation wiki: select, optiontransferselect.

Perhaps simply posting the troublesome code would be enough.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic