struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajasekhar" <>
Subject RE: [Struts2] problem with <s:select> tag
Date Mon, 17 Dec 2007 09:35:02 GMT
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 []
Sent: Saturday, December 15, 2007 4:01 AM
To: Struts Users Mailing List
Subject: [Struts2] problem with <s:select> tag

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 '': 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="" headerKey="-1" headerValue="Select Country"
                            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:
For additional commands, e-mail:

View raw message