You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by nikunj <nm...@appliedcommerce.com> on 2008/11/22 06:08:41 UTC

Problem with Select tag during migration

 

Respected All,

In Struts1X,

<html:options> having attributes property and labelproperty those are having
list data type. 

 

Example:

<html:select name="securityType"> 

<html:options name="labelValueBean" property="value"
labelName="labelValueBean" labelProperty="label"/></html:select>

 

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.

Here Key/value property having String data type. 

 

Can you please suggest me any alternative way in struts2 so that we can
manage combo as like struts1

 

 

 

Regards,

 

Nikunj

Applied Software Pvt. Ltd.

Ahmedabad

91-98249 88262


Re: Problem with Select tag during migration

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/11/24 Rajil <ra...@appliedcommerce.com>:
> But for that I should have my action and jsp coded using struts1 tags, isn't
> it?

Yes, but then you can start adding a new stuff in Struts2 way ;-)


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


RE: Problem with Select tag during migration

Posted by nikunj <nm...@appliedcommerce.com>.
That plugin is for migration struts1.2 or struts1.3 application into
struts2. not for struts1.0

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

2008/11/24 Rajil <ra...@appliedcommerce.com>:
> That means struts2 doesn't provide facility or say backward compatibility
> available in struts1??

Provide, you can use struts1-plugin to have backward compatibility.


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


RE: Problem with Select tag during migration

Posted by Rajil <ra...@appliedcommerce.com>.
But for that I should have my action and jsp coded using struts1 tags, isn't
it?


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

2008/11/24 Rajil <ra...@appliedcommerce.com>:
> That means struts2 doesn't provide facility or say backward compatibility
> available in struts1??

Provide, you can use struts1-plugin to have backward compatibility.


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 3633 (20081124) 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


Re: Problem with Select tag during migration

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/11/24 Rajil <ra...@appliedcommerce.com>:
> That means struts2 doesn't provide facility or say backward compatibility
> available in struts1??

Provide, you can use struts1-plugin to have backward compatibility.


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


RE: Problem with Select tag during migration

Posted by Rajil <ra...@appliedcommerce.com>.
Ha. Ha. Ha. 

That means struts2 doesn't provide facility or say backward compatibility
available in struts1??

Anyway, Thanks for your reply.

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

2008/11/24 Rajil <ra...@appliedcommerce.com>:
> I wanted to know any available option to use two lists (one for key and
> another for value) instead of using MAP.

Write your own tag for that, it will be more convenient.


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 3633 (20081124) 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


RE: Problem with Select tag during migration

Posted by nikunj <nm...@appliedcommerce.com>.
Ok!
Thanks lukasz,

Regards
Nikunj


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

2008/11/24 Rajil <ra...@appliedcommerce.com>:
> I wanted to know any available option to use two lists (one for key and
> another for value) instead of using MAP.

Write your own tag for that, it will be more convenient.


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


Re: Problem with Select tag during migration

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/11/24 Rajil <ra...@appliedcommerce.com>:
> I wanted to know any available option to use two lists (one for key and
> another for value) instead of using MAP.

Write your own tag for that, it will be more convenient.


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


RE: Problem with Select tag during migration

Posted by Rajil <ra...@appliedcommerce.com>.
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 <nm...@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


RE: Problem with Select tag during migration

Posted by nikunj <nm...@appliedcommerce.com>.
Thanks lukasz,

But, I am going to migrate my existing application in struts2.
In existing, I have two vectors for each. I have lots of place where I have
taken twos.
That is why I am finding ways that reduce migration time.


Regards,
Nikunj Mulani
-----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 <nm...@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


Re: Problem with Select tag during migration

Posted by Lukasz Lenart <lu...@googlemail.com>.
2008/11/22 nikunj <nm...@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