我有一个问题,我的系统配置是Mojarra 2.1.7, 正面3.2, 使用玻璃鱼3.1+。
在这之前,我用这个代码 完成了我的代码:
<p:tabView>
<p:tab title="Offices Access" >
<h:outputText value="Access | Offices Name | Offices Code | Parent Offices" style="font-weight: bold;"/>
<ui:repeat value="#{userBean.officeses}" var="office">
<h:panelGrid columns="2">
<p:selectBooleanCheckbox id="access#{office.officesID}" style="width: 50px;"/>
<h:outputLabel for="access#{office.officesID}" value="#{office.officesName} | #{office.officesCode} | #{office.parentOffices}"/>
</h:panelGrid>
</ui:repeat>
</p:tab>
</p:tabView>
and i find this is generate rather ugly interfaces, so i ran over p:panelGrid
from primefaces.
after i write some code and from my expectation it would work, but it DONT :(
this code render the header perfectly, but right after the ui:repeat
code, it wouldnt render the p:row
and the p:column
inside it.
以下是代码:
<p:tabView>
<p:tab title="Offices Access" >
<p:panelGrid styleClass="centerContent">
<f:facet name="header">
<p:row>
<p:column style="font-weight: bold;">Access</p:column>
<p:column style="font-weight: bold;">Offices Name</p:column>
<p:column style="font-weight: bold;">Offices Code</p:column>
<p:column style="font-weight: bold;">Above Level Offices</p:column>
</p:row>
</f:facet>
<ui:repeat value="#{userBean.officeses}" var="office">
<p:row id="rowforOffice#{office.officesID}">
<p:column><p:selectBooleanCheckbox id="access#{office.officesID}"/></p:column>
<p:column><h:outputText value="#{office.officesName}"/></p:column>
<p:column><h:outputText value="#{office.officesCode}"/></p:column>
<p:column><h:outputText value="#{office.parentOffices}"/></p:column>
</p:row>
</ui:repeat>
</p:panelGrid>
</p:tab>
</p:tabView>
am i miss something..?
or it is was a bug..? because i ran over google looking for this kind of code and i found nothing.
Regards,
bLueZ