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