This content has been marked as final.
Show 4 replies
-
1. Re: rich:togglePanel problems
henrik.lindberg Aug 10, 2007 12:03 PM (in response to henrik.lindberg)a4j:repeat gives the same result as ui:repeat btw.
-
2. Re: rich:togglePanel problems
henrik.lindberg Aug 10, 2007 12:18 PM (in response to henrik.lindberg)This horrible construction is what I ended up with - not very flexible as I have to hard-code the number of facets.
<h:form id="#{containerName}" > <rich:togglePanel id="panel" switchType="client" initialState="x_#{texts[0].id}" stateOrder="x_#{texts[0].id},x_#{texts[1].id}, x_#{texts[2].id}, x_#{texts[3].id}, x_#{texts[4].id}" > <f:facet name="x_#{texts[0].id}"> <h:panelGroup> <h:outputText styleClass="#{textStle}" value="#{texts[0].digest}" /> <rich:toggleControl for="#{containerName}:panel" value="next..." switchToState="x_#{texts.size() gt 1 ? texts[1].id : texts[0].id}" /> </h:panelGroup> </f:facet> <f:facet name="x_#{texts[1].id}"> <h:panelGroup> <h:outputText styleClass="#{textStle}" value="#{texts[1].digest}" /> <rich:toggleControl for="#{containerName}:panel" value="next..." switchToState="x_#{texts.size() gt 2 ? texts[2].id : texts[0].id}" /> </h:panelGroup> </f:facet> <f:facet name="x_#{texts[2].id}"> <h:panelGroup> <h:outputText styleClass="#{textStle}" value="#{texts[2].digest}" /> <rich:toggleControl for="#{containerName}:panel" value="next..." switchToState="x_#{texts.size() gt 3 ? texts[3].id : texts[0].id}" /> </h:panelGroup> </f:facet> <f:facet name="x_#{texts[3].id}"> <h:panelGroup> <h:outputText styleClass="#{textStle}" value="#{texts[3].digest}" /> <rich:toggleControl for="#{containerName}:panel" value="next..." switchToState="x_#{texts.size() gt 4 ? texts[4].id : texts[0].id}" /> </h:panelGroup> </f:facet> <f:facet name="x_#{texts[4].id}"> <h:panelGroup> <h:outputText styleClass="#{textStle}" value="#{texts[4].digest}" /> <rich:toggleControl for="#{containerName}:panel" value="next..." switchToState="x_#{texts[0].id}" /> </h:panelGroup> </f:facet> </rich:togglePanel> </h:form>
And, again, if I take out the stateOrder, nothing is rendered. -
3. Re: rich:togglePanel problems
henrik.lindberg Aug 10, 2007 12:20 PM (in response to henrik.lindberg)This is using a snapshot richfaces-3.0.2-20070726.000143-39
and seam 2 beta -
4. Re: rich:togglePanel problems
henrik.lindberg Aug 10, 2007 12:45 PM (in response to henrik.lindberg)I just learned something - ui:repeat has a UI element in the tree, whereas c:forEach is just a tag.
So, replacing ui:repeat with c:forEach makes a big difference. (Will post something that works). But I can't get around listing all the states...