7
我想在对话框内设置一个panelgrid。一切似乎都在工作,除了colspan。我已经检查过这个帖子PrimeFaces panelGrid,但是它的一年半年了。从primefaces手册和展示中,colspan应该被datatable和panelGrid接受。primefaces panelgrid colspan不工作
<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>
但我无法找到我做错了什么。
非常感谢。另外,当我现在对手册中的colspan和rowspan规范进行说明时,PanelGrid也支持rowspan和colspan选项,在这种情况下,应该手动定义行和列标记。“ 再次感谢您的快速回答。 – 2013-02-19 10:42:09
“删除列属性” - 做的伎俩。 – Stefan 2015-04-28 12:40:43