myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Meyer <>
Subject f:selectItem escape attribute doesn't work ?
Date Wed, 08 Aug 2012 10:49:48 GMT
I would like to format selectItem label with html tags in  selectOneRadio component. But
the label is not rendered as HTML. What I'm doing wrong? 
&lt;t:selectOneRadio id="idRadioJSF" layout="spread" &gt;
        &lt;f:selectItem itemValue="1" itemLabel="#{controller.formatLabel('test')}"
escape="false" /&gt;
&lt;t:radio index="0" for="idRadioJSF" id="testRADIOJSF0" /&gt;
My Method looks like :
public String formatLabel(String label){
        return  "&lt;span class=\"description\"&gt;"+label+"&lt;/span&gt;"
Browser render it like :
&lt;input id="page:tabRepeat:0:parameterRepeat:0:testRADIOJSF0" type="radio" name="page:tabRepeat:0:parameterRepeat:0:idRadioJSF"
value="1" /&gt;
&lt;label for="page:tabRepeat:0:parameterRepeat:0:testRADIOJSF0"&gt; &amp;lt;span
 I'm using Myfaces ver 2.1.1 and Tomahawk lib.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message