tags:

views:

200

answers:

2

I need to render a line break using outputText so that I can utilize the rendered attributed. I tried

<h:outputText value="<br/>" escape="false" />

but it generated exception

The value of attribute "value" associated with an element type "null" must not contain the '<' character. 
A: 

You can try putting the "<br />" inside a resource bundle and then get the value from that resource bundle.

ferrari fan
+1  A: 

That's indeed not valid anymore since Facelets since that's syntactically invalid in XML. You can however just emit the <br/> in template text without the need for a h:outputText. To render it conditionally, wrap it in a <f:verbatim>.

<f:verbatim rendered="#{bean.rendered}"><br /></f:verbatim>
BalusC
as always, you the best !!!
Harry Pham
You're welcome :)
BalusC