Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

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

Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Adrian Crum-2
If the bug is a Freemarker issue, then it should be solved in the template. UI labels might be used elsewhere, so they shouldn't contain Freemarker artifacts.

-Adrian

--- On Sat, 11/21/09, [hidden email] <[hidden email]> wrote:

> From: [hidden email] <[hidden email]>
> Subject: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: [hidden email]
> Date: Saturday, November 21, 2009, 10:01 AM
> Author: bibryam
> Date: Sat Nov 21 18:01:50 2009
> New Revision: 882948
>
> URL: http://svn.apache.org/viewvc?rev=882948&view=rev
> Log:
> Used raw string literal to escape ${} chars in example
> labels. This fixes the error reported in user list.
>
> Modified:
>    
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>
> Modified:
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=882948&r1=882947&r2=882948&view=diff
> ==============================================================================
> ---
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> (original)
> +++
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Sat
> Nov 21 18:01:50 2009
> @@ -99,8 +99,8 @@
>          <value
> xml:lang="zh">æ°æ®é¡¹11ï¼å¸¦æ缺çå¼çæ¥æåæ¶é´éæ©</value>
>      </property>
>      <property
> key="ExampleDateField11Tooltip">
> -        <value
> xml:lang="en">Uses the \${date:dayStart(nowTimestamp,
> timeZone, locale)} UEL expression to set the default value
> to the start of today</value>
> -        <value
> xml:lang="zh">使ç¨\${date:dayStart(nowTimestamp,
> timeZone,
> locale)}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
> +        <value
> xml:lang="en">Uses the \${r'${date:dayStart(nowTimestamp,
> timeZone, locale)}'} UEL expression to set the default value
> to the start of today</value>
> +        <value
> xml:lang="zh">使ç¨\${r'${date:dayStart(nowTimestamp,
> timeZone,
> locale)}'}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
>      </property>
>      <property
> key="ExampleDateField1Title">
>          <value
> xml:lang="en">Field1: date and time selection
> field</value>
> @@ -175,10 +175,10 @@
>          <value
> xml:lang="zh">æ°æ®é¡¹9ï¼æ¥æåæ¶é´éæ©å¸¦æ缺çå¼</value>
>      </property>
>      <property
> key="ExampleDateField9Tooltip">
> -        <value
> xml:lang="en">Same as above, uses the \${groovy:...}
> notation to call an util method to get the now
> timestamp</value>
> -        <value xml:lang="fr">La
> même chose mais utilise la notation \${groovy:...} pour
> appeler un méthode utilitaire pour obtenir l'heure du
> moment</value>
> -        <value xml:lang="it">Lo
> stesso di sopra, usare la notazione \${groovy:...} per
> eseguire un metodo di utilità per ottenere un nuovo
> timestamp</value>
> -        <value
> xml:lang="zh">åä¸ï¼ä½¿ç¨\${groovy:...}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
> +        <value
> xml:lang="en">Same as above, uses the
> \${r'${groovy:...}'} notation to call an util method to get
> the now timestamp</value>
> +        <value xml:lang="fr">La
> même chose mais utilise la notation \${r'${groovy:...}'}
> pour appeler un méthode utilitaire pour obtenir l'heure
> du moment</value>
> +        <value xml:lang="it">Lo
> stesso di sopra, usare la notazione \${r'${groovy:...}'} per
> eseguire un metodo di utilità per ottenere un nuovo
> timestamp</value>
> +        <value
> xml:lang="zh">åä¸ï¼ä½¿ç¨\${r'${groovy:...}'}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
>      </property>
>      <property
> key="ExampleDateTimeFields">
>          <value
> xml:lang="en">Date/Time fields</value>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Bilgin Ibryam-2
Adrian, that's true. Thanks for the reminder.

Currently these 2 labels are used to display examples of from the source
code, which is interpreted from the renderer freemarker as valid
interpolation. And I couldn't find another way to escape the them. Any
proposals?



Adrian Crum wrote:

> If the bug is a Freemarker issue, then it should be solved in the template. UI labels might be used elsewhere, so they shouldn't contain Freemarker artifacts.
>
> -Adrian
>
> --- On Sat, 11/21/09, [hidden email] <[hidden email]> wrote:
>
>  
>> From: [hidden email] <[hidden email]>
>> Subject: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>> To: [hidden email]
>> Date: Saturday, November 21, 2009, 10:01 AM
>> Author: bibryam
>> Date: Sat Nov 21 18:01:50 2009
>> New Revision: 882948
>>
>> URL: http://svn.apache.org/viewvc?rev=882948&view=rev
>> Log:
>> Used raw string literal to escape ${} chars in example
>> labels. This fixes the error reported in user list.
>>
>> Modified:
>>    
>> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>>
>> Modified:
>> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=882948&r1=882947&r2=882948&view=diff
>> ==============================================================================
>> ---
>> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>> (original)
>> +++
>> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Sat
>> Nov 21 18:01:50 2009
>> @@ -99,8 +99,8 @@
>>          <value
>> xml:lang="zh">æ°æ®é¡¹11ï¼å¸¦æ缺çå¼çæ¥æåæ¶é´éæ©</value>
>>      </property>
>>      <property
>> key="ExampleDateField11Tooltip">
>> -        <value
>> xml:lang="en">Uses the \${date:dayStart(nowTimestamp,
>> timeZone, locale)} UEL expression to set the default value
>> to the start of today</value>
>> -        <value
>> xml:lang="zh">使ç¨\${date:dayStart(nowTimestamp,
>> timeZone,
>> locale)}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
>> +        <value
>> xml:lang="en">Uses the \${r'${date:dayStart(nowTimestamp,
>> timeZone, locale)}'} UEL expression to set the default value
>> to the start of today</value>
>> +        <value
>> xml:lang="zh">使ç¨\${r'${date:dayStart(nowTimestamp,
>> timeZone,
>> locale)}'}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
>>      </property>
>>      <property
>> key="ExampleDateField1Title">
>>          <value
>> xml:lang="en">Field1: date and time selection
>> field</value>
>> @@ -175,10 +175,10 @@
>>          <value
>> xml:lang="zh">æ°æ®é¡¹9ï¼æ¥æåæ¶é´éæ©å¸¦æ缺çå¼</value>
>>      </property>
>>      <property
>> key="ExampleDateField9Tooltip">
>> -        <value
>> xml:lang="en">Same as above, uses the \${groovy:...}
>> notation to call an util method to get the now
>> timestamp</value>
>> -        <value xml:lang="fr">La
>> même chose mais utilise la notation \${groovy:...} pour
>> appeler un méthode utilitaire pour obtenir l'heure du
>> moment</value>
>> -        <value xml:lang="it">Lo
>> stesso di sopra, usare la notazione \${groovy:...} per
>> eseguire un metodo di utilità  per ottenere un nuovo
>> timestamp</value>
>> -        <value
>> xml:lang="zh">åä¸ï¼ä½¿ç¨\${groovy:...}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
>> +        <value
>> xml:lang="en">Same as above, uses the
>> \${r'${groovy:...}'} notation to call an util method to get
>> the now timestamp</value>
>> +        <value xml:lang="fr">La
>> même chose mais utilise la notation \${r'${groovy:...}'}
>> pour appeler un méthode utilitaire pour obtenir l'heure
>> du moment</value>
>> +        <value xml:lang="it">Lo
>> stesso di sopra, usare la notazione \${r'${groovy:...}'} per
>> eseguire un metodo di utilità  per ottenere un nuovo
>> timestamp</value>
>> +        <value
>> xml:lang="zh">åä¸ï¼ä½¿ç¨\${r'${groovy:...}'}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
>>      </property>
>>      <property
>> key="ExampleDateTimeFields">
>>          <value
>> xml:lang="en">Date/Time fields</value>
>>
>>
>>
>>    
>
>
>      
>  

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Adrian Crum-2
Maybe do the string expansion in the form's actions element. Then display the expanded string in Freemarker.

-Adrian

--- On Sat, 11/21/09, Bilgin Ibryam <[hidden email]> wrote:

> From: Bilgin Ibryam <[hidden email]>
> Subject: Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: [hidden email]
> Date: Saturday, November 21, 2009, 12:32 PM
> Adrian, that's true. Thanks for the
> reminder.
>
> Currently these 2 labels are used to display examples of
> from the source code, which is interpreted from the renderer
> freemarker as valid interpolation. And I couldn't find
> another way to escape the them. Any proposals?
>
>
>
> Adrian Crum wrote:
> > If the bug is a Freemarker issue, then it should be
> solved in the template. UI labels might be used elsewhere,
> so they shouldn't contain Freemarker artifacts.
> >
> > -Adrian
> >
> > --- On Sat, 11/21/09, [hidden email]
> <[hidden email]>
> wrote:
> >
> >   
> >> From: [hidden email]
> <[hidden email]>
> >> Subject: svn commit: r882948 -
> /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> >> To: [hidden email]
> >> Date: Saturday, November 21, 2009, 10:01 AM
> >> Author: bibryam
> >> Date: Sat Nov 21 18:01:50 2009
> >> New Revision: 882948
> >>
> >> URL: http://svn.apache.org/viewvc?rev=882948&view=rev
> >> Log:
> >> Used raw string literal to escape ${} chars in
> example
> >> labels. This fixes the error reported in user
> list.
> >> Modified:
> >>   
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> >>
> >> Modified:
> >>
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=882948&r1=882947&r2=882948&view=diff
> >>
> ==============================================================================
> >> ---
> >>
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> >> (original)
> >> +++
> >>
> ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> Sat
> >> Nov 21 18:01:50 2009
> >> @@ -99,8 +99,8 @@
> >>          <value
> >>
> xml:lang="zh">æ°æ®é¡¹11ï¼å¸¦æ缺çå¼çæ¥æåæ¶é´éæ©</value>
> >>      </property>
> >>      <property
> >> key="ExampleDateField11Tooltip">
> >> -        <value
> >> xml:lang="en">Uses the
> \${date:dayStart(nowTimestamp,
> >> timeZone, locale)} UEL expression to set the
> default value
> >> to the start of today</value>
> >> -        <value
> >>
> xml:lang="zh">使ç¨\${date:dayStart(nowTimestamp,
> >> timeZone,
> >>
> locale)}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
> >> +        <value
> >> xml:lang="en">Uses the
> \${r'${date:dayStart(nowTimestamp,
> >> timeZone, locale)}'} UEL expression to set the
> default value
> >> to the start of today</value>
> >> +        <value
> >>
> xml:lang="zh">使ç¨\${r'${date:dayStart(nowTimestamp,
> >> timeZone,
> >>
> locale)}'}表达å¼æ¥æ缺çå¼è®¾ç½®ä¸ºä»å¤©çå¼å§æ¶é´</value>
> >>      </property>
> >>      <property
> >> key="ExampleDateField1Title">
> >>          <value
> >> xml:lang="en">Field1: date and time selection
> >> field</value>
> >> @@ -175,10 +175,10 @@
> >>          <value
> >>
> xml:lang="zh">æ°æ®é¡¹9ï¼æ¥æåæ¶é´éæ©å¸¦æ缺çå¼</value>
> >>      </property>
> >>      <property
> >> key="ExampleDateField9Tooltip">
> >> -        <value
> >> xml:lang="en">Same as above, uses the
> \${groovy:...}
> >> notation to call an util method to get the now
> >> timestamp</value>
> >> -        <value
> xml:lang="fr">La
> >> même chose mais utilise la notation
> \${groovy:...} pour
> >> appeler un méthode utilitaire pour obtenir
> l'heure du
> >> moment</value>
> >> -        <value
> xml:lang="it">Lo
> >> stesso di sopra, usare la notazione \${groovy:...}
> per
> >> eseguire un metodo di utilità per ottenere
> un nuovo
> >> timestamp</value>
> >> -        <value
> >>
> xml:lang="zh">åä¸ï¼ä½¿ç¨\${groovy:...}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
> >> +        <value
> >> xml:lang="en">Same as above, uses the
> >> \${r'${groovy:...}'} notation to call an util
> method to get
> >> the now timestamp</value>
> >> +        <value
> xml:lang="fr">La
> >> même chose mais utilise la notation
> \${r'${groovy:...}'}
> >> pour appeler un méthode utilitaire pour obtenir
> l'heure
> >> du moment</value>
> >> +        <value
> xml:lang="it">Lo
> >> stesso di sopra, usare la notazione
> \${r'${groovy:...}'} per
> >> eseguire un metodo di utilità per ottenere
> un nuovo
> >> timestamp</value>
> >> +        <value
> >>
> xml:lang="zh">åä¸ï¼ä½¿ç¨\${r'${groovy:...}'}æ¥è°ç¨ä¸ä¸ªåºç¨æ¹æ³æ¥è·å¾ç°å¨çæ¶é´æ³</value>
> >>      </property>
> >>      <property
> >> key="ExampleDateTimeFields">
> >>          <value
> >> xml:lang="en">Date/Time fields</value>
> >>
> >>
> >>
> >>     
> >
> >
> >         
>
>



Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Bilgin Ibryam-2
Adrian, I am not sure I  understand your proposal.
For example one of the labels contains this: "Same as above, uses the
\${groovy:...} notation to call an util method to get the now timestamp"
So even expanded in the action element, during the rendering of the
label in the tooltip, freemarker tries to execute part of the label:
${groovy:...}


Adrian Crum wrote:
> Maybe do the string expansion in the form's actions element. Then display the expanded string in Freemarker.
>
> -Adrian
>  
 
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml

Adrian Crum-2
This is an interesting conundrum. I thought the problem was in a Freemarker template, but it turns out it is in the macro form renderer.

I don't have a solution or suggestion at this time. I will have to think about it.

-Adrian

--- On Sat, 11/21/09, Bilgin Ibryam <[hidden email]> wrote:

> From: Bilgin Ibryam <[hidden email]>
> Subject: Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: [hidden email]
> Date: Saturday, November 21, 2009, 1:59 PM
> Adrian, I am not sure I 
> understand your proposal.
> For example one of the labels contains this: "Same as
> above, uses the \${groovy:...} notation to call an util
> method to get the now timestamp"
> So even expanded in the action element, during the
> rendering of the label in the tooltip, freemarker tries to
> execute part of the label: ${groovy:...}
>
>
> Adrian Crum wrote:
> > Maybe do the string expansion in the form's actions
> element. Then display the expanded string in Freemarker.
> >
> > -Adrian
> >   
>
>