You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Session A Mwamufiya <sm...@andrew.cmu.edu> on 2007/08/04 00:04:33 UTC

getting the selected item in s:select

Hi,

Could someone tell me how in my action code I could get the item that was selected by a user in a s:select list?

Thanks,
Session


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: getting the selected item in s:select

Posted by Session A Mwamufiya <sm...@andrew.cmu.edu>.
I'm sorry for the spam Laurie, I'll make sure to continue the same thread next time.

You actually clarified my understanding of the way s:select works, because I was under the impression that we had to make a specific function call to get the list of selected options, but it is done by the framework and all we need to do is access the property that we've associated with the selection list.

Thanks a million, and again sorry for the spam.

Best,
Session


> Session A Mwamufiya wrote:
>> Could someone tell me how in my action code I could get the item that
>> was selected by a user in a s:select list?
> 
> 
> Firstly, please dont' spam the list by repeatedly posting the same 
> question. If you don't get an answer to a question in a reasonable amout 
> of time, it's probably because you've framed the question in a way that is
> difficult to answer, or you haven't provided enough information. Try 
> replying to your original post on the topic, adding more information 
> and/or restating and clarifying the question.
> 
> In this case, the problem is that your question is rather vague. If you 
> have your s:select bound to a property on your action (name='property'), 
> and your action has the appropriate getter and setter methods for that 
> property, it should 'just work'.
> 
> Post a sample of the code you have tried and what specifically is not 
> working as you expect.
> 
> L.
> 
> 
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional
> commands, e-mail: user-help@struts.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: getting the selected item in s:select

Posted by Laurie Harper <la...@holoweb.net>.
Session A Mwamufiya wrote:
> Could someone tell me how in my action code I could get the item that was selected by a user in a s:select list?


Firstly, please dont' spam the list by repeatedly posting the same 
question. If you don't get an answer to a question in a reasonable amout 
of time, it's probably because you've framed the question in a way that 
is difficult to answer, or you haven't provided enough information. Try 
replying to your original post on the topic, adding more information 
and/or restating and clarifying the question.

In this case, the problem is that your question is rather vague. If you 
have your s:select bound to a property on your action (name='property'), 
and your action has the appropriate getter and setter methods for that 
property, it should 'just work'.

Post a sample of the code you have tried and what specifically is not 
working as you expect.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org