struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajil" <ra...@appliedcommerce.com>
Subject RE: Problem with Select tag during migration
Date Mon, 24 Nov 2008 04:18:32 GMT
Thanks Lukasz for your reply;

But I have so many listBeans created for older Version of struts.  And they
are containing two lists instead of one map.

Hance, it is not convenient to upgrade all beans to have map instead of two
lists.

I wanted to know any available option to use two lists (one for key and
another for value) instead of using MAP.


- Rajil


-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@googlemail.com] 
Sent: Sunday, November 23, 2008 3:02 PM
To: Struts Users Mailing List
Subject: Re: Problem with Select tag during migration

2008/11/22 nikunj <nmulani@appliedcommerce.com>:
> But Struts2 doesn't support separate List data type for label and value.
> Example:
>
> <s:select name="qsymbolcode" list="ListBean1.comboLabelValue"
>
> listValue="value"
>
> listKey="key"></s:select>
>
> Data type of comboLabelValue is List, Which add object having key/value
> property.

But instead of using list you can use Map with key / value par, and
put some KeyObject as a key and then ValueObject as your value, in
such way you will have

<s:select name="myObject" list="myObjectMap"
listValue="somePropertyOfValueObject"
listKey="somePropertyOfKeyObject"></s:select>


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


__________ NOD32 3632 (20081121) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com



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


Mime
View raw message