togglePanel and toggleControl
mathandos Oct 20, 2010 8:37 AMHi
Hoping someone might be able to assist. I'm working on togglePanel but I can't get it around to do what I want it to do.
scenario ...
tipBlock.xhtml
<f:subview>
<h:panelGrid styleClass="infopanel" cellpadding="0" cellspacing="0" columnClasses="col"
rowClasses="row1, row2,row3" border="2" columns="1">
<h:outputText value="#{tip}" />
<rich:separator height="2" />
<h:panelGrid columns="3">
<rich:toggleControl value="Close" switchToState="closed" />
<rich:toggleControl switchToState="#{previous}" value="#{empty previous? '': '« Previous'}" />
<rich:toggleControl switchToState="#{next}" value="#{empty next? '': 'Next »'}" />
</h:panelGrid>
</h:panelGrid>
-------------------------------------------
anotherOne.xhtml
<rich:togglePanel switchType="client"
stateOrder="panal1,panal2,panal3,owner,agent,architect">
<f:facet name="panal1">
<ui:include src="/tipBlock.xhtml" >
<ui:param name="tip" value="rich:toggleControl might bre located inside of outside
of the rich:toogleControl it works for. In case of outside location, the control
attribute 'for' should refer to the toggle panel id." />
<ui:param name="next" value="panel2"/>
</ui:include>
</f:facet>
<f:facet name="panal2">
<ui:include src="/tipBlock.xhtml">
<ui:param name="tip" value="Attribute initialState defines the first state appear
when the page is loaded. If this attribute is not specified, the first state
mentioned in the attribute stateOrder will be the first"/>
<ui:param name="previous" value="panel1"/>
<ui:param name="next" value="panel3"/>
</ui:include>
</f:facet>
<f:facet name="panal3">
<ui:include src="/tipBlock.xhtml">
<ui:param name="tip" value="Note that rich:toggleControl similar to
h:commandLink for 'server' mode and smilar to a4j:commandLink for 'ajax' mode.
Set immediate attribute to true if jsf form has other input field that might
cause the validation error. Otherwize, the state switched will not perform"/>
<ui:param name="previous" value="panel2"/>
<ui:param name="next" value="panel3"/>
</ui:include>
</f:facet>
</rich:togglePanel>
-----------------------------------
Question...
in the first ui:param instead of showing the string value, is it possible to show any sort of output panel?
Hoping someone might be able to assist. I'm working on togglePanel but I can't get it around to do what I want it to do.
scenario ...
tipBlock.xhtml
<f:subview>
<h:panelGrid styleClass="infopanel" cellpadding="0" cellspacing="0" columnClasses="col"
rowClasses="row1, row2,row3" border="2" columns="1">
<h:outputText value="#{tip}" />
<rich:separator height="2" />
<h:panelGrid columns="3">
<rich:toggleControl value="Close" switchToState="closed" />
<rich:toggleControl switchToState="#{previous}" value="#{empty previous? '': '« Previous'}" />
<rich:toggleControl switchToState="#{next}" value="#{empty next? '': 'Next »'}" />
</h:panelGrid>
</h:panelGrid>
-------------------------------------------
anotherOne.xhtml
<rich:togglePanel switchType="client"
stateOrder="panal1,panal2,panal3,owner,agent,architect">
<f:facet name="panal1">
<ui:include src="/tipBlock.xhtml" >
<ui:param name="tip" value="rich:toggleControl might bre located inside of outside
of the rich:toogleControl it works for. In case of outside location, the control
attribute 'for' should refer to the toggle panel id." />
<ui:param name="next" value="panel2"/>
</ui:include>
</f:facet>
<f:facet name="panal2">
<ui:include src="/tipBlock.xhtml">
<ui:param name="tip" value="Attribute initialState defines the first state appear
when the page is loaded. If this attribute is not specified, the first state
mentioned in the attribute stateOrder will be the first"/>
<ui:param name="previous" value="panel1"/>
<ui:param name="next" value="panel3"/>
</ui:include>
</f:facet>
<f:facet name="panal3">
<ui:include src="/tipBlock.xhtml">
<ui:param name="tip" value="Note that rich:toggleControl similar to
h:commandLink for 'server' mode and smilar to a4j:commandLink for 'ajax' mode.
Set immediate attribute to true if jsf form has other input field that might
cause the validation error. Otherwize, the state switched will not perform"/>
<ui:param name="previous" value="panel2"/>
<ui:param name="next" value="panel3"/>
</ui:include>
</f:facet>
</rich:togglePanel>
-----------------------------------
Question...
in the first ui:param instead of showing the string value, is it possible to show any sort of output panel?