ftl macro renderer problem?

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

ftl macro renderer problem?

Hans Bakker
not sure but the following form does not display properly
only screens and forms are used.

https://localhost3:8443/catalog/control/EditProductStoreEmails?productStoreId=9000

--
http://www.antwebsystems.com :
Quality OFBiz support for competitive rates....

Reply | Threaded
Open this post in threaded view
|

Re: ftl macro renderer problem?

Jacopo Cappellato-4
Hi Hans,

yes, this is a bug introduced by the new renderer.
It is caused by the following data:

<ProductStoreEmailSetting productStoreId="9000"  
emailType="PRDS_GC_PURCHASE" bodyScreenLocation="component://ecommerce/
widget/EmailGiftCardScreens.xml#GiftCardPurchase" fromAddress="[hidden email]
" subject="A Gift From ${senderName}!"/>

The problem is the content of the "subject" field ("A Gift From $
{senderName}!") that the renderer implements with the following macro  
call:

<@renderTextField value="A Gift From ${senderName}" />

Freemarker evaluates it instead of treating as plain text... hmmmm I  
have to find out how to escape the content of a string that is passed  
to a macro call.

Jacopo


On Jul 7, 2009, at 10:47 AM, Hans Bakker wrote:

> not sure but the following form does not display properly
> only screens and forms are used.
>
> https://localhost3:8443/catalog/control/EditProductStoreEmails?productStoreId=9000
>
> --
> http://www.antwebsystems.com :
> Quality OFBiz support for competitive rates....
>


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ftl macro renderer problem?

Vadiraj-2
To escape freemarker evaluation, place the code under

<#noparse>
....
</#noparse>

HTH
-Vadiraj.

Jacopo Cappellato wrote:

> Hi Hans,
>
> yes, this is a bug introduced by the new renderer.
> It is caused by the following data:
>
> <ProductStoreEmailSetting productStoreId="9000"
> emailType="PRDS_GC_PURCHASE"
> bodyScreenLocation="component://ecommerce/widget/EmailGiftCardScreens.xml#GiftCardPurchase"
> fromAddress="[hidden email]" subject="A Gift From ${senderName}!"/>
>
> The problem is the content of the "subject" field ("A Gift From
> ${senderName}!") that the renderer implements with the following macro
> call:
>
> <@renderTextField value="A Gift From ${senderName}" />
>
> Freemarker evaluates it instead of treating as plain text... hmmmm I
> have to find out how to escape the content of a string that is passed
> to a macro call.
>
> Jacopo
>
>
> On Jul 7, 2009, at 10:47 AM, Hans Bakker wrote:
>
>> not sure but the following form does not display properly
>> only screens and forms are used.
>>
>> https://localhost3:8443/catalog/control/EditProductStoreEmails?productStoreId=9000 
>>
>>
>> --
>> http://www.antwebsystems.com :
>> Quality OFBiz support for competitive rates....
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: ftl macro renderer problem?

Jacopo Cappellato-4
Well, I ended up to resolve this (in rev. 791841) with a different  
approach:

<@renderTextField value=r"A gift From ${senderName}" />

(notice the r before the string)

By the way, thank you to both of you for the bug report and suggestions.

Jacopo



On Jul 7, 2009, at 2:22 PM, Vadiraj wrote:

> To escape freemarker evaluation, place the code under
>
> <#noparse>
> ....
> </#noparse>
>
> HTH
> -Vadiraj.
>
> Jacopo Cappellato wrote:
>> Hi Hans,
>>
>> yes, this is a bug introduced by the new renderer.
>> It is caused by the following data:
>>
>> <ProductStoreEmailSetting productStoreId="9000"  
>> emailType="PRDS_GC_PURCHASE" bodyScreenLocation="component://
>> ecommerce/widget/EmailGiftCardScreens.xml#GiftCardPurchase"  
>> fromAddress="[hidden email]" subject="A Gift From $
>> {senderName}!"/>
>>
>> The problem is the content of the "subject" field ("A Gift From $
>> {senderName}!") that the renderer implements with the following  
>> macro call:
>>
>> <@renderTextField value="A Gift From ${senderName}" />
>>
>> Freemarker evaluates it instead of treating as plain text... hmmmm  
>> I have to find out how to escape the content of a string that is  
>> passed to a macro call.
>>
>> Jacopo
>>
>>
>> On Jul 7, 2009, at 10:47 AM, Hans Bakker wrote:
>>
>>> not sure but the following form does not display properly
>>> only screens and forms are used.
>>>
>>> https://localhost3:8443/catalog/control/EditProductStoreEmails?productStoreId=9000
>>>
>>> --
>>> http://www.antwebsystems.com :
>>> Quality OFBiz support for competitive rates....
>>>
>>


smime.p7s (3K) Download Attachment