hi this works but only if commandLinks are outside togglePanel on the same page.
I need to access certain steps of togglePanel from another page. Is it doable ? or I just need to create 4 different pages ?
my register.xhtml looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
template="/views/layouts/master-layout.xhtml">
<ui:define name="header">
<ui:include src="/views/header.xhtml">
<ui:param name="selected" value="register" />
</ui:include>
</ui:define>
<ui:define name="body">
<script type="text/javascript" src="js/register-page-script.js"></script>
<div class="register-page">
<h:form id="registrationForm">
<rich:togglePanel id="registration" switchType="ajax">
<rich:togglePanelItem id="register-1" name="register-1">
<ui:include src="/views/register-1.xhtml" />
</rich:togglePanelItem>
<rich:togglePanelItem id="register-2" name="register-2">
<ui:include src="/views/register-2.xhtml" />
</rich:togglePanelItem>
<rich:togglePanelItem id="register-3" name="register-3">
<ui:include src="/views/register-3.xhtml" />
</rich:togglePanelItem>
<rich:togglePanelItem id="register-4" name="register-4">
<ui:include src="/views/register-4.xhtml" />
</rich:togglePanelItem>
</rich:togglePanel>
</h:form>
</div>
</ui:define>
<ui:define name="footer">
<ui:include src="/views/footer.xhtml"/>
</ui:define>
</ui:composition>
page from which I would like to access certain steps from registration page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<div class="owner-page">
<div class="container_12">
<div class="grid_10 push_1">
<p class="links">
<h:form>
<h:commandLink value="#{msgBundle['businessOwner.options.edit']}" styleClass="item-1">
<rich:toggleControl targetPanel="registration" targetItem="register-1"/>
</h:commandLink>
<h:commandLink value="#{msgBundle['businessOwner.options.editSchool']}" styleClass="item-2">
<rich:toggleControl targetPanel="registration" targetItem="register-2"/>
</h:commandLink>
<h:commandLink value="#{msgBundle['businessOwner.options.editCourses']}" styleClass="item-3">
<rich:toggleControl targetPanel="registration" targetItem="register-3"/>
</h:commandLink>
<h:commandLink value="#{msgBundle['businessOwner.options.editCoupons']}" styleClass="item-3">
<rich:toggleControl targetPanel="registration" targetItem="register-4"/>
</h:commandLink>
</h:form>
<h:link styleClass="item-1" value="#{msgBundle['businessOwner.options.edit']}" outcome="register"/>
</p>
<h2>
<h:outputText value="#{msgBundle['businessOwner.panel.report']}"/>
</h2>
<h:form>
//page content
</h:form>
<h2>
<h:outputText value="#{msgBundle['businessOwner.panel.reportHistory']}" />
</h2>
<h:form>
//other irrelevant page content
</h:form>
</div>
<div class="grid_3">
</div>
<div class="clear"></div>
</div>
</div>
</ui:composition>