What is the field name that you want to have returned (defined by
listKey) and what is the field name you want to display to the user
(defined by listValue).  

If they're not "key" and "value" respectively then that's why you're
getting null.  They need to be named the same as the attributes on the
object.

-----Original Message-----
From: J J [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2008 1:10 PM
To: user@struts.apache.org
Subject: Problem with select

Hello,

I have this select but it is not working and I don't know what is
missing:

<s:select
label="myLabel" name="returnValue" list="myList" listKey="key"
listValue="value" required="true"
onchange="document.location='myAction.action'"/>

I have an myAction an attribute called MyList which contains Objects of
the same type A.
I also have an Attribute of type String in myAction called returnValue.
Objects of A type have key and value as attributes (both String).
All classes have getters and setters for their attributes.

The
problem is that when I reach the action myAction in returnValue I get
null (I have a System.out.println line just to know what it its value).
I think that I have something wrong with what I have to set in
attribute name.
Thanks in advance



      

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

Reply via email to