Label from flexibleStringExpander with UEL

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Label from flexibleStringExpander with UEL

Nicolas Malin-2
Hello,

I search to call a labelization from a flexibleStringExpander without
uiLableMap in my context.

Instead call like that ${groovy:
org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel,
locale)}, I implemented an uel function : ${str:label(myRessource,
myLable, locale)}

I like to have your remarks on the naming. I use first str: cover
perhaps it's better to use util: ? And "label" for the english friendly
it' ok for you or you have a better suggest ?

Thanks,

Nicolas

--
logoNrd <https://nereide.fr/>
        Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical
decisions are made publicly
[hidden email]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way
<http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
<http://www.libre-entreprise.org/>
Reply | Threaded
Open this post in threaded view
|

Re: Label from flexibleStringExpander with UEL

Jacques Le Roux
Administrator
Le 22/08/2017 à 13:52, Nicolas Malin a écrit :

> Hello,
>
> I search to call a labelization from a flexibleStringExpander without uiLableMap in my context.
>
> Instead call like that ${groovy: org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel, locale)}, I implemented an uel function :
> ${str:label(myRessource, myLable, locale)}
>
> I like to have your remarks on the naming. I use first str: cover perhaps it's better to use util: ? And "label" for the english friendly it' ok for
> you or you have a better suggest ?
>
> Thanks,
>
> Nicolas
>
Hi Nicolas,

str or util is OK with me since we use both already, no strong opinion.
As well for label which sounds good to me

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Label from flexibleStringExpander with UEL

Jacques Le Roux
Administrator
Le 22/08/2017 à 17:19, Jacques Le Roux a écrit :

> Le 22/08/2017 à 13:52, Nicolas Malin a écrit :
>> Hello,
>>
>> I search to call a labelization from a flexibleStringExpander without uiLableMap in my context.
>>
>> Instead call like that ${groovy: org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel, locale)}, I implemented an uel function :
>> ${str:label(myRessource, myLable, locale)}
>>
>> I like to have your remarks on the naming. I use first str: cover perhaps it's better to use util: ? And "label" for the english friendly it' ok
>> for you or you have a better suggest ?
>>
>> Thanks,
>>
>> Nicolas
>>
> Hi Nicolas,
>
> str or util is OK with me since we use both already, no strong opinion.
> As well for label which sounds good to me
>
> Jacques
>
>
BTW, is this new UEL for forms?  Because remember we have decided to deprecate Minilang where so far ${str: and ${util: UELs are mostly used.

Jacques

Reply | Threaded
Open this post in threaded view
|

Re: Label from flexibleStringExpander with UEL

Nicolas Malin-2
Le 22/08/2017 à 17:21, Jacques Le Roux a écrit :

>>>
>>> I search to call a labelization from a flexibleStringExpander
>>> without uiLableMap in my context.
>>>
>>> Instead call like that ${groovy:
>>> org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel,
>>> locale)}, I implemented an uel function : ${str:label(myRessource,
>>> myLable, locale)} ...
> BTW, is this new UEL for forms?  Because remember we have decided to
> deprecate Minilang where so far ${str: and ${util: UELs are mostly used.
>
> Jacques
Not really, I just want call it from the theme definition
         <visual-theme id="BLUELIGHT" display-name="BlueLight Theme">
             <description>${str:label('CommonEntityLabels',
'VisualTheme.description.BLUELIGHT', locale)}</description>
             <screenshot location="/bluelight/screenshot.jpg"/>
         </visual-theme>
I didn't think about minilang, but I always in my mind to improve de
groovyDSL like previously

Nicolas
Reply | Threaded
Open this post in threaded view
|

Re: Label from flexibleStringExpander with UEL

Nicolas Malin-2
I create the issue OFBIZ-9617 and commit it on revision 1805888 with
util prefix.

If we found a better name than label I will update the code.

Nicolas

Le 22/08/2017 à 17:59, Nicolas Malin a écrit :

> Le 22/08/2017 à 17:21, Jacques Le Roux a écrit :
>>>>
>>>> I search to call a labelization from a flexibleStringExpander
>>>> without uiLableMap in my context.
>>>>
>>>> Instead call like that ${groovy:
>>>> org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel,
>>>> locale)}, I implemented an uel function : ${str:label(myRessource,
>>>> myLable, locale)} ...
>> BTW, is this new UEL for forms?  Because remember we have decided to
>> deprecate Minilang where so far ${str: and ${util: UELs are mostly used.
>>
>> Jacques
> Not really, I just want call it from the theme definition
>         <visual-theme id="BLUELIGHT" display-name="BlueLight Theme">
>             <description>${str:label('CommonEntityLabels',
> 'VisualTheme.description.BLUELIGHT', locale)}</description>
>             <screenshot location="/bluelight/screenshot.jpg"/>
>         </visual-theme>
> I didn't think about minilang, but I always in my mind to improve de
> groovyDSL like previously
>
> Nicolas
>