This content has been marked as final.
Show 3 replies
-
1. Re: Problem with modalPanel wizard
tchoesang Nov 5, 2008 6:10 AM (in response to pedro.pr88)I am facing exactly the same problem. It would be great, if somebody could give a hint on where the mistake could be.
cheers!
Chö -
2. Re: Problem with modalPanel wizard
nbelaevski Nov 5, 2008 11:22 PM (in response to pedro.pr88)Hello,
Try to
1. Bind viewId to model bean property:<a4j:include viewId="#{bean.property}"/>
2. Reset bean.property to initial value by command link action activation. -
3. Re: Problem with modalPanel wizard
tchoesang Nov 6, 2008 5:47 AM (in response to pedro.pr88)Hi Nick, Thanks alot for your help. It worked beautifully. I am posting my code here for those who are interested.
index.xhtml<h:outputLink value="#" onclick="Richfaces.showModalPanel('mpWizard');">showWizard</h:outputLink> <rich:modalPanel id="mpWizard" width="600" height="300" zindex="2000" resizeable="false" moveable="true"> <f:facet name="header">Titel des Popups</f:facet> <f:facet name="controls"> <h:graphicImage value="/images/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('mpWizard')" /> </f:facet> <h:panelGroup id="wizardPanelGroup"> <a4j:include viewId="#{wizardBean.viewId}" /> </h:panelGroup> </rich:modalPanel>
step1.xhtml<h:form> <h:outputText value="Go to the step 2"/> <a4j:commandButton value="next" action="gonext" reRender="wizardPanelGroup"/> </h:form>
step2.xhtml<h:form> <h:outputText value="Close window"/> <h:commandButton type="button" value="Close" onclick="Richfaces.hideModalPanel('mpWizard')"/> </h:form>
WizardBean.javapublic class WizardBean { private String viewId="/wizard/step1.xhtml"; /** * @return the viewId */ public String getViewId() { return viewId; } /** * @param viewId the viewId to set */ public void setViewId(String viewId) { this.viewId = viewId; } }
faces-config.xml<managed-bean> <managed-bean-name>wizardBean</managed-bean-name> <managed-bean-class>bean.WizardBean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/wizard/step1.xhtml</from-view-id> <navigation-case> <from-outcome>gonext</from-outcome> <to-view-id>/wizard/step2.xhtml</to-view-id> </navigation-case> </navigation-rule>