hi Raghuveer 
   you can solve your problem through call prepare() method again means
   in action method before return String like SUCCESS OR INPUT OR LOGIN
   call prepare() method once again it will display select component values
   perfectly as normally.

-----Original Message-----
From: Raghuveer Rawat [mailto:[EMAIL PROTECTED]
Sent: Saturday, December 15, 2007 4:01 AM
To: Struts Users Mailing List
Subject: [Struts2] problem with <s:select> tag


Hi,
I have a getting problem in using s:select tag. Need some help if anyone
used s:select before.
This dropdown is populated dynamically. When form is loaded initially
dropdown is getting populated perfectly. No issue here.
But when we submit the form and some of the validations fail then page is
not getting displayed correctly. This is because dropdown values are not
coming back after the form submit. Not sure what need to be done to bring
back this dropdown values.
I can see below error in the log.

 Servlet.service() for servlet jsp threw exception
tag 'select', field 'list', name 'user.country': The requested list key
'countryList' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

Here is my jsp code for this issue:

<s:select name="user.country" headerKey="-1" headerValue="Select Country"
cssClass="textbox1"
                            list="countryList" listKey="code"
listValue="name" required="true" />

Pl. let me know if you need some more information.

Thanks in advance.



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

Reply via email to