This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 2 s:select Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 s:select" Watch "Struts 2 s:select" New topic

Struts 2 s:select

Kim Long

Joined: Jun 06, 2008
Posts: 9

i'm having trouble using the namespace of the s:select element.
I'm using the s:select to populate a list of objects which works fine.
My goal is when a specific value was set and submitted it should be put
on the getter method which i define on the namespace.
I have read that struts 2 somehow has trouble with the s:select making this.
Any recommandations ? Or is there maybe a working example with this specific scenario which i can lookup.

Thanks for your help in advance


Kim Long

Joined: Jun 06, 2008
Posts: 9
no suggestions ?
sunil gupta

Joined: May 07, 2008
Posts: 21
if you have a getter method with the same name as your select name it will set that method with the selected value and then you can call getter method to get the value. it is all done auto matically, just define the get and set method int he action class.
rocket mass heater kickstarter
subject: Struts 2 s:select