How do I add an empty element in a JSF panelGrid?
This is my full table:
<h:panelGrid columns="2">
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
</h:panelGrid>
How do I add an empty element? What is the advised way? (adding an empty outputlabel? This does not feel correct.)
<h:panelGrid columns="2">
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
<!-- This need to be emtpy -->
<h:outputLabel value="row2"/>
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
</h:panelGrid>
In JSF , “h:panelGrid” tag is used to generate HTML table tags to place JSF components in rows and columns layout, from left to right, top to bottom.
PanelGrid is an extension to the standard panelGrid with theme integration, grouping and responsive features.
Use an empty <h:panelGroup>
.
<h:panelGrid columns="2">
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
<h:panelGroup />
<h:outputLabel value="row2"/>
<h:outputLabel value="row1"/>
<h:outputLabel value="row2"/>
</h:panelGrid>
<h:panelGrid>
Unrelated to the concrete problem, are you in basic HTML terms very well aware of when you should be using <h:outputLabel>
instead of <h:outputText>
? If not, carefully read Purpose of the h:outputLabel and its "for" attribute.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With