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="<br/>" 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
Post a Comment