I forgot (again) to say that the s:select tag is even not displayed on the jsp. That's why i think it's a problem of populating, but i don't really understand how the s:select will provide the Integer key to my class company who is waiting for an Integer after the submit. Anyway i can't submit form so i don't think the problem come from it.
Company class : @Entity public class Company { @Id @GeneratedValue private Integer id; private Integer typeCompanyENUM; private String name; private String city; private Integer zipcode; private String address; private String country; private String phone; private String email; private String website; private Date dateCreation; public Integer getTypeCompanyENUM() { return typeCompanyENUM; } public void setTypeCompanyENUM(Integer typeCompanyENUM) { this.typeCompanyENUM = typeCompanyENUM; } //Others getters and setters } On Tue, Apr 13, 2010 at 2:50 PM, Stephane Cosmeur <cosm...@gmail.com> wrote: > 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 > -- Stéphane Cosmeur 06 33 54 36 04