You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by SRINIKALLS <sr...@cognizant.com> on 2009/07/07 12:56:13 UTC
How to set list to map
Hi
In Minilang simple-method, is to possible to set a list value to
map?
Thanks & Regards
Prashanth Jilla
--
View this message in context: http://www.nabble.com/How-to-set-list-to-map-tp24371114p24371114.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How to set list to map
Posted by SRINIKALLS <sr...@cognizant.com>.
here the from-field type is BigDecimal and while iterating its giving the
error as :
UEL exception while getting value: java.lang.NumberFormatException: For
input string:
so how to convert or set the fields in this senario
Chirag Manocha wrote:
>
> Hi Prashanth,
>
> You can iterate list by create your map as :-
>
> <set field="key" value="1"/>
> <iterate list="valueList" entry="value">
> <set field="mapName.key${key}" from-field="value"/>
> <!-- Or you can use
> <set field="mapName.${value}" from-field="value"/>
> -->
> <set field="key" value="${key + 1}"/>
> </iterate>
>
> This will give you direction for making your keys for map and obviously
> map.
> Use it accordingly.
>
> Regards
> --
> Chirag Manocha
> HotWax Media Pvt. Ltd.
> Website :- www.hotwaxmedia.com
> Contact :- +91-98263-19099
>
>
>
> On Tue, Jul 7, 2009 at 4:26 PM, SRINIKALLS
> <srinivas.kallumadi@cognizant.com
>> wrote:
>
>>
>> Hi
>>
>>
>> In Minilang simple-method, is to possible to set a list value to
>> map?
>>
>>
>> Thanks & Regards
>> Prashanth Jilla
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-set-list-to-map-tp24371114p24371114.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/How-to-set-list-to-map-tp24371114p24373329.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: How to set list to map
Posted by Chirag Manocha <ma...@gmail.com>.
Hi Prashanth,
You can iterate list by create your map as :-
<set field="key" value="1"/>
<iterate list="valueList" entry="value">
<set field="mapName.key${key}" from-field="value"/>
<!-- Or you can use
<set field="mapName.${value}" from-field="value"/>
-->
<set field="key" value="${key + 1}"/>
</iterate>
This will give you direction for making your keys for map and obviously map.
Use it accordingly.
Regards
--
Chirag Manocha
HotWax Media Pvt. Ltd.
Website :- www.hotwaxmedia.com
Contact :- +91-98263-19099
On Tue, Jul 7, 2009 at 4:26 PM, SRINIKALLS <srinivas.kallumadi@cognizant.com
> wrote:
>
> Hi
>
>
> In Minilang simple-method, is to possible to set a list value to
> map?
>
>
> Thanks & Regards
> Prashanth Jilla
> --
> View this message in context:
> http://www.nabble.com/How-to-set-list-to-map-tp24371114p24371114.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>