Not applicable.

I am trying to install a panel inside a dialog box. Everything seems to work, except for the kolspan. I checked this post by PrimeFaces panelGrid , but its year and fifty thousand. From the right-hand guide and showcases, colspan should be taken using datatable and panelGrid.

<h:form id="idFormAddDialog"> <p:panelGrid id="idPanelAddUsers" columns="2"> <h:outputLabel for="dAddOutUser" value="Username:"></h:outputLabel> <h:inputText id="dAddOutUser" value="#{userController.username}"></h:inputText> <h:outputLabel for="dSelRole" value="Role:"></h:outputLabel> <h:selectOneMenu id="dSelRole" value="#{userController.role}"> <f:selectItem itemLabel="Admin" itemValue="1"></f:selectItem> <f:selectItem itemLabel="Researcher" itemValue="2"></f:selectItem> <f:selectItem itemLabel="User" itemValue="3"></f:selectItem> </h:selectOneMenu> <h:outputLabel for="dAddINPassword1" value="Password: "></h:outputLabel> <p:password id="dAddINPassword1" value="#{userController.password}" feedback="true"></p:password> <p:row> <p:column colspan="2"> <p:separator></p:separator> <!-- <p:separator></p:separator>--> </p:column> </p:row> <p:commandButton value="OK" actionListener="#{userController.addUser()}" ></p:commandButton> <p:button value="Cancel"></p:button> </p:panelGrid> </h:form> 

But I can’t find what I am doing wrong.

+7
source share
1 answer

First, if you want to use p:row and p:column in p:panelGrid remove the columns attribute and manually control the rows and column using the p:row and p:column tags. Everything inside p:panelGrid should be inside p:row tags. Example:

 <p:panelGrid id="idPanelAddUsers"> <p:row> <p:column></p:column> <p:column></p:column> <p:column></p:column> </p:row> <p:row> <p:column colspan="2"></p:column> <p:column></p:column> </p:row> </p:panelGrid> 
+20
source

All Articles