You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by bi...@apache.org on 2009/11/21 19:01:51 UTC

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

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>



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

Posted by Adrian Crum <ad...@yahoo.com>.
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 <bi...@gmail.com> wrote:

> From: Bilgin Ibryam <bi...@gmail.com>
> Subject: Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: dev@ofbiz.apache.org
> 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
> >   
> 
> 


      

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

Posted by Bilgin Ibryam <bi...@gmail.com>.
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
>   
 

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

Posted by Adrian Crum <ad...@yahoo.com>.
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 <bi...@gmail.com> wrote:

> From: Bilgin Ibryam <bi...@gmail.com>
> Subject: Re: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: dev@ofbiz.apache.org
> 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, bibryam@apache.org
> <bi...@apache.org>
> wrote:
> > 
> >   
> >> From: bibryam@apache.org
> <bi...@apache.org>
> >> Subject: svn commit: r882948 -
> /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> >> To: commits@ofbiz.apache.org
> >> 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>
> >> 
> >> 
> >> 
> >>     
> > 
> > 
> >         
> 
> 


      

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

Posted by Bilgin Ibryam <bi...@gmail.com>.
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, bibryam@apache.org <bi...@apache.org> wrote:
>
>   
>> From: bibryam@apache.org <bi...@apache.org>
>> Subject: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
>> To: commits@ofbiz.apache.org
>> 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>
>>
>>
>>
>>     
>
>
>       
>   


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

Posted by Adrian Crum <ad...@yahoo.com>.
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, bibryam@apache.org <bi...@apache.org> wrote:

> From: bibryam@apache.org <bi...@apache.org>
> Subject: svn commit: r882948 - /ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
> To: commits@ofbiz.apache.org
> 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>
> 
> 
>