我在这里遇到了一个问题,我的系统配置是Mojarra 2.1.7,Primefaces 3.2和使用Glassfish 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>
Run Code Online (Sandbox Code Playgroud)
我发现这会产生相当丑陋的界面,所以我p:panelGrid从主要界面跑了过来.
在我编写一些代码并且从我的期望中它会起作用,但它不会:(
这段代码完美呈现标题,但在ui:repeat代码之后,它不会渲染它p:row和p:column内部.
这是代码:
<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 …Run Code Online (Sandbox Code Playgroud)