In Party Manager application, in Find Party screen the DropDown to
select a party role are ordered in ascending alphabetical order, but only when English language is selected. In other languages the order is still based in the English entity descriptions. The same happens in other screens with this dropdown and with others. In this case I see that the list is being ordered in PartyServices.java public static Map findParty(DispatchContext dctx, Map context) but at this stage the list values aren´t translated yet. Is there another list ordering command I could use that orders the lists AFTER being translated. Thank you in advance. -- Guido Amarilla |
Guido,
The descriptions are translated in the view model:: - <drop-down/> widget directive does not have an "order-by" directive . I don't know if it would be possible to have one (haven't look at the implementation). - Another possible workaround would be to define a freemarker macro that would sort it - Most probably the new integrated DOJO technology will be useful for this too. I also see that ordering in the ofbiz logical/data layer is not a best practice way of sorting lists as this is a role for the view layer I appreciate the translating work done in ofbiz, but it needs further going. Another example is viewing/selection of dates and timestamps in local format (which I think would be nice for english-speaking users too.) Guido Amarilla escribió: > In Party Manager application, in Find Party screen the DropDown to > select a party role are ordered in ascending alphabetical order, but > only when English language is selected. In other languages the order > is still based in the English entity descriptions. > The same happens in other screens with this dropdown and with others. > > In this case I see that the list is being ordered in > PartyServices.java public static Map findParty(DispatchContext dctx, > Map context) but at this stage the list values aren´t translated yet. > > Is there another list ordering command I could use that orders the > lists AFTER being translated. > > Thank you in advance. > -- ------------------------------------------------------------------------ Soluciones de Gestión para su empresa eBusiness, ERP, CRM ------------------------------------------------------------------------ *Daniel Martínez Martínez* * * Director de Proyectos C/ Julia García Boután, 29 D 3ºB 28022 Madrid España * * E-mail: [hidden email] <mailto:[hidden email]> Web: *www.paradisosistemas.es <http://www.paradisosistemas.es> *Comercial: [hidden email] <mailto:[hidden email]> Tel: 678416758 |
Daniel,
Thank you for your answer. Many of the lists are created like this one: <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option> <#list roleTypes as roleType> <option value="${roleType.roleTypeId}">${roleType.get ("description",locale)}</option> </#list> So even... <#list roleTypes?sort_by("description") as roleType> ...won´t work. - How can I forge a new list inside freemarker, in order to iterate the original list and create a new list with the translated lists and then use sort_by to sort it and then create the select's options ? Guido 2007/3/15, Daniel Martínez <[hidden email]>: > > Guido, > > The descriptions are translated in the view model:: > > - <drop-down/> widget directive does not have an "order-by" directive . > I don't know if it would be possible to have one (haven't look at the > implementation). > - Another possible workaround would be to define a freemarker macro that > would sort it > - Most probably the new integrated DOJO technology will be useful for > this too. > > I also see that ordering in the ofbiz logical/data layer is not a best > practice way of sorting lists as this is a role for the view layer > > I appreciate the translating work done in ofbiz, but it needs further > going. Another example is viewing/selection of dates and timestamps in > local format (which I think would be nice for english-speaking users too.) > > Guido Amarilla escribió: > > In Party Manager application, in Find Party screen the DropDown to > > select a party role are ordered in ascending alphabetical order, but > > only when English language is selected. In other languages the order > > is still based in the English entity descriptions. > > The same happens in other screens with this dropdown and with others. > > > > In this case I see that the list is being ordered in > > PartyServices.java public static Map findParty(DispatchContext dctx, > > Map context) but at this stage the list values aren´t translated yet. > > > > Is there another list ordering command I could use that orders the > > lists AFTER being translated. > > > > Thank you in advance. > > > > -- > ------------------------------------------------------------------------ > Soluciones de Gestión para su empresa > eBusiness, ERP, CRM > ------------------------------------------------------------------------ > *Daniel Martínez Martínez* > * * > Director de Proyectos > C/ Julia García Boután, 29 D 3ºB > 28022 Madrid > España * * > E-mail: [hidden email] > <mailto:[hidden email] > > Web: *www.paradisosistemas.es <http://www.paradisosistemas.es> > *Comercial: [hidden email] <mailto:[hidden email]> > Tel: 678416758 > > > |
Free forum by Nabble | Edit this page |