This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic