jsf - p:dataGrid does not align multiple columns -


i display list of label/input using <p:datagrid>. code simple, can't expected result.

this code:

<p:datagrid columns="2" value="#{scriptmanagerform.params}" var="conf">     <p:column>         <p:outputlabel value="#{conf.name}" />     </p:column>     <p:column>         <p:inputtext value="#{conf.value}" required="true" />     </p:column> </p:datagrid> 

and result now:

results obtained

and need get:

expected

you need property layout="grid" in datagrid


Comments