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?
Child components of AccordionPanel not executed
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Ideas was to avoid validation errors on tab change, that code was there before migration of events to ajax behaviors to it might be better to let the users define what to process with p:ajax? What do you think?
-
- Posts: 5
- Joined: 02 Dec 2011, 12:11
- Contact:
+1 for letting the user control what to process. Because the way it is implemented now the behavior can't be changed. I don't know what the default value for process on p:ajax is (@this I guess?) but I guess the default behavior won't change for users of the component if the checks are taken out.
I can create an issue for that if you want.
I can create an issue for that if you want.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Please create an issue and post the issue link here. There is pending accordion-tabview maintenance for 3.0.RC1 so we can have a look in detail. Thanks.
-
- Posts: 5
- Joined: 02 Dec 2011, 12:11
- Contact:
Created issue 2962 ([1]) including patch and test web app.
[1]: http://code.google.com/p/primefaces/iss ... il?id=2962
[1]: http://code.google.com/p/primefaces/iss ... il?id=2962
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Great, thanks, we'll look in detail before RC1.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 28 guests