jsf - How to display a line break with outputText? -


i need render line break using outputtext can utilize rendered attributed. tried

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

but generated exception

the value of attribute "value" associated element type "null" must not contain '<' character.  

that's indeed not valid since facelets because it's syntactically invalid in xml. you'd need manually escape xml special characters <, > , on.

<h:outputtext value="&lt;br/&gt;" escape="false" /> 

you can emit <br/> in template text without need <h:outputtext>.

<br/> 

to render conditionally, wrap in example <ui:fragment>.

<ui:fragment rendered="#{bean.rendered}"><br /></ui:fragment> 

a <h:panelgroup> valid doesn't emit html anyway.

<h:panelgroup rendered="#{bean.rendered}"><br /></h:panelgroup> 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -