Nicolas,
Please have a look into the method specified urlEncodeArgs() of UtilHttp
class. It takes the Map as argument and if while conversion it gives you '{
}' then it is fine. You just need to use map converter instead of list
converter.
It should works perfectly then. Assuming you are talking about the
StringUtil.toList method, and I'm redirecting to you to use
StringUtil.toMap method.

HTH!

--
Rishi Solanki
Manager, Enterprise Software Development
HotWax Media Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxmedia.com


On Fri, Apr 27, 2012 at 8:42 PM, Nicolas Malin <
malin.nico...@librenberry.net> wrote:

> Hi, I would like to explain a little problem with OFBiz convert where I
> don't found a clean solution.
>
> To start : a search form with a multiple drop-down  that call a perform
> service with an attribute List
> the form :
> <field name="**partyClassificationGroupId">
> <drop-down allow-multiple="true" size="20" allow-empty="true">...
>
> the service :
> <service ...>
> <attribute name="**partyClassificationGroupId" type="List" mode="IN"
> optional="true"/> ...
>
> When I execute the research, the service get the list but the paginate
> lost it.
> On the queryString the list is encoded like this : "{element1, element2}",
> but the service use Converter class to load it and search : "[element1,
> element2]".
>
> The queryString is encoded by UtilHttp.urlEncodeArgs :
> if (value instanceof String) {
> valueStr = (String) value;
> } else {
> valueStr = value.toString();
> }
> which generate "{element1, element2}"
>
> And converter StringToList :
> if (obj.startsWith("[") && obj.endsWith("]")) {
> return StringUtil.toList(obj);
>
> Other point, converter ListToString use also value.toString();
>
> Do you think it is better to extend StringToList to support "{}" or to
> correct encode and convert process to use "[]" ?
>
> Nicolas
>
>
> -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet :
> http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12
> Site : http://www.librenberry.net/
>

Reply via email to