-
1. Re: togglePanel and problems during Ajax ReRender
ilya_shaikovsky Mar 23, 2009 6:02 AM (in response to speleomaniac)which version you using?
https://jira.jboss.org/jira/browse/RF-4370 -
2. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 23, 2009 6:48 AM (in response to speleomaniac)3.3.0.GA
-
3. Re: togglePanel and problems during Ajax ReRender
ilya_shaikovsky Mar 23, 2009 7:58 AM (in response to speleomaniac)https://jira.jboss.org/jira/browse/RF-3552
use 3.3.1.
Beta1 is already available -
4. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 23, 2009 8:38 AM (in response to speleomaniac)Thx for the tip but 3.3.1-BETA1 didn't solved my problem....
https://jira.jboss.org/jira/browse/RF-3552 is interesting problem but it is not exactly defining the problem I have...
My problem is, if the datatable is once rendered with a togglePanel that is initially closed but switched to open state but user click, when we are getting an event from the a4j:push to rerender the datatable, toggle panel switches to the closed state.
We don't have effect like a chained reaction of several togglepanels... -
5. Re: togglePanel and problems during Ajax ReRender
ilya_shaikovsky Mar 23, 2009 9:06 AM (in response to speleomaniac)ok.. lets check your code.
-
6. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 23, 2009 9:09 AM (in response to speleomaniac)That is the next Problem, my code is extreme complex and lies in several different .xhtml files (included with ui:include)....
I would try to create a test project and send it here... -
7. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 23, 2009 10:06 AM (in response to speleomaniac)I was further debuging the problem and I have a question that might have something to do with the problem....
In a4j:push reRender attribute I defined a component that lies in the datatable. The problem I see now in UIComponentBase class, findComponent method there is an if statement defining the following...
if (!(kid instanceof NamingContainer)) {
if (checkId && id.equals(kid.getId())) {
result = kid;
break;
}
result = findComponent(kid, id, true);
if (result != null) {
break;
}
} else if (id.equals(kid.getId())) {
result = kid;
break;
}
The following 'if (!(kid instanceof NamingContainer)) ' prevents that findComponent would go deeper in the component that had implemented the NamingContainer interface....
Is this means that we are not allowed define components in rerender attributes that lies inside of datatable? -
8. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 23, 2009 10:59 AM (in response to speleomaniac)Also another interesting piece of code, there is an option to write the reRender attributes in the following form (mainly in NamingContainer.SEPARATOR_CHAR) ':table1:panelToRerender1' so the UIComponentBase can search with findComponent fitting component...
But in AjaxContextImpl class following piece of code exists...
private String convertId(UIComponent component, String id) {
if (id.charAt(0) == NamingContainer.SEPARATOR_CHAR) {
return id;
}
which means UIComponentBase findComponents gets no chance to search the component tree to findout the compoent....
How this sort of reRender attributes are processed? -
9. Re: togglePanel and problems during Ajax ReRender
speleomaniac Mar 24, 2009 7:36 AM (in response to speleomaniac)Ok,
finally I had created the test project, you would initially see that I had problem to use togglePanel in the a4j:repeat. When I click toggle control to expand the element nothing changes in the GUI....
I had created a maven project that you can duplicate the problem, while there is no possiblity to attach this project in to the forums, I will create a JIRA issue so you get the project....
If you can tell me what I am doing wrong I would be gratefull..
There is 2 test pages one containing simple togglePanel to show actually, toggle panel works (http://localhost:8080/toggletest/faces/pages/toggleTest.xhtml)...
Second one same togglepanel is embeded inside of a a4j:repeat control to demonstrate the problem(http://localhost:8080/toggletest/faces/pages/toggleRepeaterTest.xhtml)
And the JIRA link
https://jira.jboss.org/jira/browse/RF-6589