You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sidharth Bhatia <si...@gmail.com> on 2009/02/16 20:56:30 UTC
Using a list in the select tag
Hi,
I have the following problem. I have a list that on one side comes out of an
object called CountryCode wich has a name and code field that is linked into
the list as follows:
<s:select id="registration_countryCode" name="country" multiple="false"
list="country" listKey="code" listValue="name" label="Country:
">
</s:select>
The action that is called by the form implements ModelDriven<User>, and the
user has a countryCode object as one of its fields under country. But when
the value comes back from the list it comes as a string, and the auto
population of the User object fails because of this. Is there anything I can
do to the jsp tags to change this?
thanks,
Sid Bhatia
"Try not. Do... or do not. There is no try" -- Yoda
_________________________
* <ma...@lehman.com> mailto:sidharth.bhatia1@gmail.com