Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: EE-3.0.0.GA
-
Fix Version/s: 3.1.0.BETA2, 3.1
-
Component/s: ACE-Components
-
Labels:None
-
Environment:All
-
Assignee Priority:P2
Description
The issue lies after a row has been removed. When a row is removed and then another row is selected to be deleted, the confirmationDialog is displayed for a quick moment and then is gone. Clicking the button again will show the dialog correctly. This only happens after a row is removed from the table.
-
Hide
- Case11220Example.war
- 8.28 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/com/.../example/Item.class 1 kB
- WEB-INF/classes/.../example/TestBean.class 2 kB
- WEB-INF/lib/commons-logging.jar 51 kB
- WEB-INF/lib/icefaces-ee-ace.jar 1.45 MB
- WEB-INF/lib/icefaces-ee-compat.jar 2.55 MB
- WEB-INF/lib/icefaces-ee-ext.jar 55 kB
- WEB-INF/lib/icefaces-ee.jar 267 kB
- WEB-INF/lib/icepush-ee.jar 304 kB
- WEB-INF/lib/jsf-api.jar 598 kB
- WEB-INF/lib/jsf-impl.jar 1.81 MB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/lib/jxl.jar 689 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 148 kB
- WEB-INF/lib/standard.jar 380 kB
- WEB-INF/web.xml 2 kB
- welcomeICEfaces.xhtml 3 kB
-
- Case11220Example.zip
- 19 kB
- Arran Mccullough
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
This problem can be easily avoided by appending "return false;" at the end of the onclick attribute of the h:commandButton used to display the dialog. This situation no longer happens if using the latest build.
The problem occurred in the test app because the h:commandButton used to display the dialog was making a submit (as is normal) and thus the server was sending a response with an update for the whole table, so the original HTML elements used to display the dialog the first time were immediately replaced. With "return false;", no submit is made to the server and thus there are no updates to apply while the dialog is showing.
Now, even without using "return false;" in the onclick attribute of the button, ideally there shouldn't be an update of the whole table if the user didn't directly changed the state of the application. I analyzed the response and I noticed that there's this node '<div style="display:none;">2</div>' at the very end of the table markup, which seems to increase at every request. This is the only thing that changes in the markup when clicking the button to display the dialog. Since, this node doesn't have its own client id, then the parent element (root node of the table component) has to be updated, and thus the whole table markup is updated and the original dialog nodes disappear. In the latest build this is no longer the case, so these unnecessary updates do not take place any more.
The only situation where something like this can still occur is when the first page of the application that is loaded by the user is this page (thus starting a new session) and the server has to use the jsessionid parameter in the url. Then, when this parameter is no longer necessary, the url of the containing form will change, triggering an update for the whole form. However, this is avoided by simply using "return false;", as explained above.
Attached test case to reproduce issue.
Steps: