This content has been marked as final.
Show 3 replies
-
1. Re: How to reset the initial viewId of a a4j:include ?
ilya_shaikovsky Jun 11, 2009 11:42 AM (in response to avaldez314)Define the viweId of include using EL expression and reset it when needed.
-
2. Re: How to reset the initial viewId of a a4j:include ?
avaldez314 Jun 11, 2009 1:24 PM (in response to avaldez314)"ilya_shaikovsky" wrote:
Define the viweId of include using EL expression and reset it when needed.
Thank you for the suggestion, but I'm afraid that it didn't work. I tried it, and even added the modalPanel and child components in the reRender property of the a4j:commandLink that initiates the wizard.
If I put a breakpoint in the createBean.getWizardStep1ViewId() it's only called when the page is first loaded and when changing from the first page of the wizard to the next page.
Any other workaround? I'm kind of lost :-(<h:form> <a4j:commandLink ajaxSingle="true" id="createlink" oncomplete="#{rich:component('createPanel')}.show()" reRender="cratePanel,createWizardPanel,createWizard"> <h:outputText value="Create new"/> </a4j:commandLink> </h:form> <rich:modalPanel id="createPanel"> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/images/icons/close.png" id="hidelink" styleClass="hidelink" /> <rich:componentControl for="createPanel" attachTo="hidelink" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <a4j:outputPanel id="createWizardPanel "ajaxRendered="true"> <a4j:include id="createWizard" viewId="#{createBean.wizardStep1ViewId}"/> </a4j:outputPanel> </rich:modalPanel>
-
3. Re: How to reset the initial viewId of a a4j:include ? (SOLV
avaldez314 Jun 11, 2009 8:01 PM (in response to avaldez314)"avaldez314" wrote:
"ilya_shaikovsky" wrote:
Define the viweId of include using EL expression and reset it when needed.
Thank you for the suggestion, but I'm afraid that it didn't work. I tried it, and even added the modalPanel and child components in the reRender property of the a4j:commandLink that initiates the wizard.
If I put a breakpoint in the createBean.getWizardStep1ViewId() it's only called when the page is first loaded and when changing from the first page of the wizard to the next page.
Any other workaround? I'm kind of lost :-(<h:form> <a4j:commandLink ajaxSingle="true" id="createlink" oncomplete="#{rich:component('createPanel')}.show()" reRender="cratePanel,createWizardPanel,createWizard"> <h:outputText value="Create new"/> </a4j:commandLink> </h:form> <rich:modalPanel id="createPanel"> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/images/icons/close.png" id="hidelink" styleClass="hidelink" /> <rich:componentControl for="createPanel" attachTo="hidelink" operation="hide" event="onclick" /> </h:panelGroup> </f:facet> <a4j:outputPanel id="createWizardPanel "ajaxRendered="true"> <a4j:include id="createWizard" viewId="#{createBean.wizardStep1ViewId}"/> </a4j:outputPanel> </rich:modalPanel>
Holding the viewId in a property of a managed bean and reseting it in an actionEvent when starting the wizard solve the issue.
My mistake was that I only created the getter and not the setter for the property that holds the viewId, it seems that the a4j:include also needs the setter to work properly.