I tried this as well :

<s:select label="Select company
type" list="mapTypeCompanyENUM" headerValue="-- Please Select --"/>

Regards,

On Tue, Apr 13, 2010 at 12:51 PM, Stephane Cosmeur <cosm...@gmail.com>wrote:

> Hello
>
> I know my problem is quite common but i can't figure out by google and
> myself, although many people had the same problem.
>
> I try to populate a s:select with a map (Map<Integer, String>, but i got
> the (well known) following error :
> tag 'select', field 'list', id 'typeCompanyENUM', name 'typeCompanyENUM':
> The requested list key 'mapTypeCompanyENUM' could not be resolved as a
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
>
> I have getters and setters on my Map and the map is populated :
>
> public Map<Integer, String> getMapTypeCompanyENUM() {
>  return mapTypeCompanyENUM;
> }
>
> public void setMapTypeCompanyENUM(Map<Integer, String> mapTypeCompanyENUM)
> {
>  this.mapTypeCompanyENUM = mapTypeCompanyENUM;
> }
>
> My declare my s:select as follows :
> <s:select id="typeCompanyENUM" name="typeCompanyENUM" label="Select company
> type" list="mapTypeCompanyENUM" listKey="typeCompanyENUM.{key}"
>  listValue="typeCompanyENUM.{value}"
>  headerValue="-- Please Select --"/>
>
> I know the problem is about the listKey and listValue attribute. I tried
> many thing, but no ones worked out :
> listKey="typeCompanyENUM.{key}"
> listValue="typeCompanyENUM.{value}"
> ...
>
> I dont know either if i should use the attribute of s:select, key and
> value. I saw many diffrent case on diffrent mailing list and i am a bit lost
> among all of those.
>
> Thank you for your help.
>
> --
> Stéphane Cosmeur
> 06 33 54 36 04
>



-- 
Stéphane Cosmeur
06 33 54 36 04

Reply via email to