Thanks Gary,
It's a good idea. Anyhow, it seems strange to me because the escape attribute appears in the jsf reference,

thanks.
----- Original Message ----- From: "Gary VanMatre" <[EMAIL PROTECTED]>
To: <[email protected]>; "Daniel del Río" <[EMAIL PROTECTED]>
Sent: Friday, August 18, 2006 8:58 PM
Subject: Re: Escape xml characters in set element at clay-config.xml


>From: Daniel del Río <[EMAIL PROTECTED]>

Hi all, I have the following problem when using clay components:

I want to create a simple form with a label and an input. The input have an accesskey, so I want to make a letter from the label underscored. My code looks
like this:

...
<component jsfid="name" extends="outputLabel">
   <set name="value" value="#{messages['name']}"/>
   <set name="escape" value="false"/>
</component>
...

and my resource boundle have an entry with the right html code:

...
name=<u>N</u>ame
...


The problem is that clay resolves with an HTML that shows literally
"<u>N</u>name" (&lt;N ..) instead of underscore N.>



As odd as it may seem, the JSF outputLabel component doesn't have an escape property.

Try nesting an outputText component under the outputLabel and use the outputText's escape property.

<component jsfid="name" extends="outputLabel">
  <attributes>
     <set name="accesskey" value="N"/>
  </attributes>

   <element renderId="0" jsfid="outputText">
      <attributes>
         <set name="value" value="#{messages['name']}"/>
         <set name="escape" value="false"/>
      </attributes>
   </element>
</component>


I'm using the last nightly version of shale.

Thanks in advance.
drh.


Gary


Reply via email to