Child components of AccordionPanel not executed
Posted: 02 Dec 2011, 12:19
Hi,
for a customer I tried to create an accordion panel with input fields in different tabs (PrimeFaces 3.0 M4). Via a listener, the entered data should be saved on every tab change. The xhtml looks like this:
<p:accordionPanel id="accordion" dynamic="false">
<p:ajax event="tabChange" process="@form" update=":form:accordion"
listener="#{page1Controller.tabChangeListener}"/>
<p:tab id="tab1" title="Tab 1">
<h:inputText id="string1" value="#{page1Controller.string1}"/>
</p:tab>
...
</p:accordionPanel>
The form fields never get submitted. I also found the problem: AccordionPanel only processes child components in its processXXX() methods if it is not the source of the ajax request:
if(isRequestSource(context)) {
return;
}
Could anyone explain to me why this is done?
for a customer I tried to create an accordion panel with input fields in different tabs (PrimeFaces 3.0 M4). Via a listener, the entered data should be saved on every tab change. The xhtml looks like this:
<p:accordionPanel id="accordion" dynamic="false">
<p:ajax event="tabChange" process="@form" update=":form:accordion"
listener="#{page1Controller.tabChangeListener}"/>
<p:tab id="tab1" title="Tab 1">
<h:inputText id="string1" value="#{page1Controller.string1}"/>
</p:tab>
...
</p:accordionPanel>
The form fields never get submitted. I also found the problem: AccordionPanel only processes child components in its processXXX() methods if it is not the source of the ajax request:
if(isRequestSource(context)) {
return;
}
Could anyone explain to me why this is done?