您好我的代码中有一个panelGrid,我的日历和另一个panelGrid有我的dataTable,我的panelGrid / dataTable(id =显示3)只会出现,如果我的列表不为null,但只有当我有面板显示
<p:panel id="display" visible="false" header="Dia Selecionado #{cd.getdF()}" />
如果我把它从display3
停止工作。为什么会这样?
<h:form>
<h:panelGrid columns="2">
<p:calendar value="#{cd.date1}" pattern="dd/MM" locale="pt" mode="inline">
<p:ajax event="dateSelect" listener="#{cd.updateDate}" update="@form"/>
</p:calendar>
<p:panel id="display" visible="false" header="Dia Selecionado #{cd.getdF()}" />
<p:outputPanel id="gridContainer" layout="block" >
<h:panelGrid id="display3" rendered="#{cd.lista.size()>0}" columns="2" >
<p:panel id="display21" header="Dia Selecionado #{cd.getdF()}" style="width:250px; text-align: center">
<p:dataTable var="d" value="#{cd.lista}" emptyMessage="Não há compromissos para o dia." >
<p:column headerText="00:00" >
<h:outputText value="#{d.hr0}" />
</p:column>
</p:dataTable>
</p:panel>
<p:panel id="display1" visible="false" header="Dia Selecionado #{cd.getdF()}" />
<p:panel id="display22" header="Dia Selecionado #{cd.getdF()}" style="width:250px; text-align: center">
<p:dataTable var="d" value="#{cd.lista}" emptyMessage="Não há compromissos para o dia.">
<p:column headerText="13:00" >
<h:outputText value="#{d.hr13}" />
</p:column>
</p:dataTable>
</p:panel>
</h:panelGrid>
</p:outputPanel>
</h:panelGrid>