how to not escape an uiLabel in ftl

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

how to not escape an uiLabel in ftl

Matthieu Bollot-4
Hi,

I've got a label that contains :
<value xml:lang="fr">Réalisé</value>
and a ftl that contains :
${uiLabelMap.CameCESDone}

In the html source, i've got
R&eacute;alis&eacute;
What I want is just Réalisé. This label will be used in a javascript
function, that's why I don't want it to be escaped.

I tried to unescape the label
${Static["org.apache.commons.lang.StringEscapeUtils"].unescapeHtml(uiLabelMap.CameCESDone)}
but it does not work… It seems that the java part in the ftl page is
escaped at the end.

Any idea ?


--
Matthieu BOLLOT
www.nereide.biz

Reply | Threaded
Open this post in threaded view
|

Re: how to not escape an uiLabel in ftl

Scott Gray-2
${StringUtil.wrapString(uiLabelMap.CameCESDone)}

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 6/05/2010, at 10:11 PM, Matthieu Bollot wrote:

> Hi,
>
> I've got a label that contains :
> <value xml:lang="fr">Réalisé</value>
> and a ftl that contains :
> ${uiLabelMap.CameCESDone}
>
> In the html source, i've got
> R&eacute;alis&eacute;
> What I want is just Réalisé. This label will be used in a javascript
> function, that's why I don't want it to be escaped.
>
> I tried to unescape the label
> ${Static["org.apache.commons.lang.StringEscapeUtils"].unescapeHtml(uiLabelMap.CameCESDone)}
> but it does not work… It seems that the java part in the ftl page is
> escaped at the end.
>
> Any idea ?
>
>
> --
> Matthieu BOLLOT
> www.nereide.biz
>


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

Re: how to not escape an uiLabel in ftl

Matthieu Bollot-4
Le jeudi 06 mai 2010 à 22:16 +1200, Scott Gray a écrit :
> ${StringUtil.wrapString(uiLabelMap.CameCESDone)}
That's it ! thank you so much :)


--
Matthieu BOLLOT
www.nereide.biz