我想知道如何在默认情况下设置richfaces手风琴折叠
这是我的代码,我只是希望所有面板在加载页面时崩溃
<rich:accordion
switchType="ajax" style="width : 680px">
<c:forEach items="#{marcarConsulta.consultasDisponiveis}"
var="consultaDisponivel" varStatus="contador">
<rich:accordionItem value="#{consultaDisponivel}">
<f:facet name="header">
<h:panelGrid columns="2" cellpadding="10"
columnClasses="titulo_accordion_item">
<h:outputText value="#{consultaDisponivel.nomePessoa}" />
<h:outputText value="#{consultaDisponivel.nomeFantasia}" />
</h:panelGrid>
</f:facet>
<h:panelGroup layout="block" styleClass="accordion-date">
<h2>Escolha uma data:</h2>
<rich:calendar popup="false"
value="#{marcarConsulta.dataSelecionada}" mode="ajax"
firstWeekDay="0" boundaryDatesMode="scroll"
dataModel="#{calendarModel}" datePattern="dd/MM/yyyy">
<f:ajax listener="#{marcarConsulta.recuperarHorario}"
render="horario#{contador.index}" />
</rich:calendar>
</h:panelGroup>
</rich:accordionItem>
</c:forEach>
</rich:accordion>
提前致谢
答案 0 :(得分:0)
如果你定义一个css类如下:
<style> .myclass { display:none} </style>
然后在手风琴项上将此添加到contentClass属性中,如下所示:
<rich:accordionItem contentClass="myclass" switchType="ajax" >
然后您应该看到现在所有面板都已折叠。 点击它们现在将照常扩展。