Hello to all.
I'm implementing a multistep form in a page with a tab panel:
<rich:tabPanel switchType="client"> <rich:tab header="Header"> <h:form prependId="false" id="form-view"> <ui:include src="#{myBean.currentPage}" /> </h:form> </rich:tab> <!-- ... --> </rich:tabPanel>
Every referenced 'currentPage' contains a button like this
<h:commandButton value="Submit" action="#{myBean.setNextPage}"> <f:ajax execute=":form-view" render=":form-view"/> </h:commandButton>
Once submission is triggered, the 'currentPage' value changes and the 'form-view' (and ui:include) gets rendered.
When the new included page is dinamically loaded, the rich:fileUpload is partially rendered (no css, no working scripts on events).
On the contrary it works after a browser refresh.
Is this a bug or am I doing something wrong?
I found a solution including all the pages within the form
<ui:include src="firstPage.xhtml" /> <ui:include src="secondPage.xhtml" /> <ui:include src="thirdPage.xhtml" />
and a evaluating a rendering condition in every included page, like the following
<a4j:region rendered="#{myBean.currentPageIndex==1}"><!-- inner tree --></a4j:region>
I think this is a workaround. Do you have any suggestion?
Thanks in advance