Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put multiple components in a single cell of h:panelGrid

I would like to create a <h:panelGrid> with one column. However in one row I would like to fit two components together in one cell.

E.g.

<h:panelGrid columns="1">
     <h:outputText value="ROW 1 A"/>
     <h:outputText value="ROW 1 B"/>

     <h:outputText value="ROW 2"/>
</h:panelGrid>

Should end up in two rows

ROW 1 A ROW 1 B
ROW 2

However, it currently ends up as

ROW 1 A
ROW 1 B
ROW 2

How to put multiple components in a single cell of <h:panelGrid>?

like image 679
DD. Avatar asked Dec 05 '12 11:12

DD.


2 Answers

how about wrapping with single <h:panelGroup>

<h:panelGroup>
    <h:outputText value="ROW1 A"/>
    <h:outputText value="ROW 1 B"/>
</h:panelGroup>
like image 182
Daniel Avatar answered Oct 04 '22 23:10

Daniel


Wrap them in a <h:panelGroup>. Here is an example.

like image 39
SJuan76 Avatar answered Oct 04 '22 23:10

SJuan76