Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0
-
Fix Version/s: 3.2
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ICEfaces3.0.0. bundle1 (revision 27312)
Browsers: all
Server: Tomcat6
-
Affects:Compatibility/Configuration
Description
The ace:accordion when used with the 'panechange' event of the ace:ajax component - does not register events in the same way as it does when used with the paneChangeListener attribute enabled. This happens in all browsers when either the dynamic or the collapsible attributes of the ace:accordion is set to true.
If dynamic=true, when accordion changes panes, the ajax paneChange event is not received. This is different for an accordion with a paneChangeListener, that will always receive a pane change event, also when dynamic=true.
If collapsible=true, when collapsing the accordion's open pane followed by its re-opening, an accordion with an ace:ajax component using its paneChange event will receive 2 events, while an accordion with a paneChangeListener will register only one event.
This can be reproduced with the accordion test application located at:
http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/accordion
- load the attribute page: http://localhost:8080/accordion/accordionAttribute.jsf
- change accordion panes and notice the AjaxBehaviorEvent messages with dynamic attribute unchecked, then with dynamic attribute enabled.
- enable collapsible=true and notice the AjaxBehaviorEvent messages.
If dynamic=true, when accordion changes panes, the ajax paneChange event is not received. This is different for an accordion with a paneChangeListener, that will always receive a pane change event, also when dynamic=true.
If collapsible=true, when collapsing the accordion's open pane followed by its re-opening, an accordion with an ace:ajax component using its paneChange event will receive 2 events, while an accordion with a paneChangeListener will register only one event.
This can be reproduced with the accordion test application located at:
http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/accordion
- load the attribute page: http://localhost:8080/accordion/accordionAttribute.jsf
- change accordion panes and notice the AjaxBehaviorEvent messages with dynamic attribute unchecked, then with dynamic attribute enabled.
- enable collapsible=true and notice the AjaxBehaviorEvent messages.
Issue Links
- depends on
-
ICE-7501 ace:ajax / ClientBehaviour should produce input for a ice.ace.ab call rather than a complete call
- Closed
Here are some remarks about the feasibility of solving this issue.
When dynamic=true, a request to the server is made every time a pane is opened in order to load its content. To accomplish this, it is necessary to do an custom update (i.e. with the ice.customUpdate parameter) and pass an onSucess callback to the ajax request. Meanwhile, the ace ajax request is rendered as a function that must be called in the client as it is (with some optional parameters). For this reasons, it is not readily feasible to fire both the dynamic tab loading request and the ajax request. We could fire both events, but that would require two requests to be made. This would be easier if instead of rendering a function for ace ajax, we rendered instead a JSON object with all the data needed to make the ajax request. This object could be manipulated in the client side to satisfy different scenarios.
When collapsible=true, the paneChangeListener method binding is not invoked because the active index is now -1, and there's no value in the '_newTab' parameter, so a pane object can't be resolved and sent to the AccordionPaneChangeEvent event. This is more a matter of deciding whether we want to consider collapsing all panes as a pane change event or not. It would be easier to consider this a separate ajax event, let's say 'allPanesCollapsed'.