[prev in list] [next in list] [prev in thread] [next in thread] 

List:       struts-user
Subject:    Array object within map backed property.
From:       "Anthony Bargnesi" <abargnesi () gmail ! com>
Date:       2006-03-24 20:59:52
Message-ID: bed0c1d30603241259g4c4c2f3dtdc78e2387858ac25 () mail ! gmail ! com
[Download RAW message or body]


Hello,

I am trying to use an Integer Array (Integer[]) within a map backed property
of my
ValidatorForm.  I declare my map as follows:

private Map _websiteIds = new HashMap();

The map _websiteIds is keyed by a String and the value object is an
Integer[].  In my
jsp file I try referencing the integer array within the map as such:

<html:select property="websiteIds(ids)" multiple="true" size="5">
    <html:options collection="WEB_SITES" property="websiteId"
labelProperty="websiteCode"/>
</html:select>

The map works with an integer but I would like to use either an array or
list.  This needs
to be this way because I have multiple="true" meaning I need multiple
selections to be set
in the request (and back in the form).  Am I doing something wrong to use an
array within
a map or is this even possible?

Thanks,

Anthony Bargnesi


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic