My suggestion would be to make your action implement Preparable and
initialize the list in the prepare() method.
  (*Chris*)

On Tue, Apr 12, 2011 at 10:16 AM, Eric Lentz <eric.le...@sherwin.com> wrote:

> Struts 2.2.1
> I have a page with a list:
>        <s:select name="user.gender" headerKey="" headerValue="Select
> Gender"
>                listKey="code" listValue="description" list="genderList"
> />
> and I populate genderList when I display the page.
>
> If I add a validation file, validating anything, not even specifically the
> list, the page fails telling me that the list "could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name}"
>
> The failure occurs before the action is even reached. If I extend
> ActionSupport and override validate() and populate the list, then the page
> works again.
>
> This seems like a bug.
>
> For example, if I populate the list, display the page, and then the user
> submits the page with changes, the collection should not be required
> during the submit - only the values I'm validating (which does not include
> a drop-down list of values). This is just extra DB noise that is not
> necessary.
>
> Are there other solutions?

Reply via email to