struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Map instead of List in action
Date Wed, 20 Feb 2008 09:12:53 GMT
Change your property/method signatures from

   List<...> persons = new SomeList<...>();

   public List getMap();
   public void setMap(List value);

to

   Map<Long, Person> persons = new HashMap<Long, Person>();

   public Map<Long, Person> getMap();
   public void setMap(Map<Long, Person> value);

L.

Sessizlik wrote:
> Hi Musachy,
> 
> Thank you for your response,
> 
> I am sorry but I can understand how to change getter and setter.
> 
> How should be signatures of getter and setter? Just changing return type
> should not be enough ?
> 
> Best Regards
> Sessizlik
> 
> 
> 
> 
> Musachy Barroso wrote:
>> Change the setter and getter and access the map like:
>>
>> <s:property value="map[id].prop.prop" />
>>
>> musachy
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message