in my jsp I receive correctly value and key, but I want to get the selected Item in the action who follows the jsp (myAction). I think that the value should be stored in the attribute name (which has to be the same type as listkey), but I get null in the action, I don't understand what's wrong. thanks
________________________________ De: "Peterson, Ryan" <[EMAIL PROTECTED]> Para: Struts Users Mailing List <user@struts.apache.org> Enviado: miƩrcoles, 12 de noviembre, 2008 22:46:36 Asunto: RE: Problem with select 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]