Hi, thanks for your reply i think i did it right but still getting an
exception:
this is how it works when i do a textfield and enter the value by my hand:
<s:textfield id="athy" label="Rolle" name="a.Auth"/>

And this is when i try doing it with the s:select
<s:select name="a.Auth" list="authorities" label="Choose" listValue="athy"/>

i have getter/setter for a in my ActionClass. a is a Object from another
Class lets call it Athy. authorities is a list in my ActionClass which has
getter/setter too. and athy is the string from the Class Athy(where i make
the "a" object from). the list and listValue thing is working because i get
the right values populated the thing which doesnt work is the name attribute
"a.Auth". Its Strange that in a textfield when i send the value it works ..
 
The items in the list are populated but when i select something and push
submit i get this error:
java.util.NoSuchElementException



Jim Kiley wrote:
> 
> The s:select tag doesn't have much to do with the namespace.
> 
> What you'll want to do is something like this:
> 
> <s:form action="myAction">
> <s:select name="myProperty" list="backingList" listKey="field1"
> listValue="field2" label="Choose a thing"/>
> <s:submit />
> </s:form>
> 
> Then you just have to make sure that your action ('myAction') has getters
> and setters for 'myProperty', a getter for 'backingList', and that each
> element of 'backingList' has fields 'field1' and 'field2', both of which
> have public getters.
> 
> Does this help?
> 
> jk
> 
> On Thu, Jun 12, 2008 at 9:34 AM, kukudas <[EMAIL PROTECTED]> wrote:
> 
>>
>> hi,
>>
>> basicly i can't find any working example, howto set the value which was
>> choosen into a variable so i can use this in my beans. i've tryied using
>> the
>> namespace which didn't work.
>> someone can provide me with an working example would be awesome thanks.
>>
>> greets
>>
>> kuku
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-2-s%3Aselect-question-tp17800089p17800089.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> -- 
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2-s%3Aselect-question-tp17800089p17801387.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to