Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Grimlock trunk 10/25/2011
-
Assignee Priority:P1
Description
-
Hide
- Case10642Example.war
- 7.35 MB
- Arran Mccullough
-
- META-INF/MANIFEST.MF 0.1 kB
- META-INF/context.xml 0.1 kB
- WEB-INF/classes/com/.../example/Item.class 0.8 kB
- WEB-INF/classes/.../example/TestBean.class 2 kB
- WEB-INF/lib/commons-beanutils.jar 226 kB
- WEB-INF/lib/commons-collections.jar 558 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-logging.jar 52 kB
- WEB-INF/lib/icefaces-ace.jar 1.39 MB
- WEB-INF/lib/icefaces-compat.jar 2.29 MB
- WEB-INF/lib/icefaces.jar 237 kB
- WEB-INF/lib/javax.faces.jar 2.48 MB
- WEB-INF/web.xml 2 kB
- welcomeICEfaces.xhtml 2 kB
-
Hide
- Case10642Example.zip
- 18 kB
- Arran Mccullough
-
- Case10642Example/build.xml 3 kB
- Case10642Example/.../ant-deploy.xml 2 kB
- Case10642Example/.../build-impl.xml 58 kB
- Case10642Example/.../genfiles.properties 0.5 kB
- Case10642Example/.../private.properties 0.5 kB
- Case10642Example/.../project.properties 3 kB
- Case10642Example/nbproject/project.xml 0.9 kB
- Case10642Example/src/conf/MANIFEST.MF 0.0 kB
- Case10642Example/src/.../example/Item.java 0.5 kB
- Case10642Example/src/.../TestBean.java 1 kB
- Case10642Example/web/.../context.xml 0.1 kB
- Case10642Example/web/WEB-INF/web.xml 2 kB
- Case10642Example/.../welcomeICEfaces.xhtml 2 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
I believe that this problem may be due to a DOM diff / update bug, in part because it is hard to reproduce (the 2nd filtering must contain only 1 row, the Williams app doesn't even work the first time), but most strongly because it is fixed by altering the page layout very slightly:
<ace:dataTable id="testTable"
value="#
var="item"
stateMap="#{testBean.stateMap}"
selectionMode="single">
<ace:column headerText="Column One"
filterBy="#{item.itemOne}">
<h:outputText value="#{item.itemOne}"/>
</ace:column>
<ace:column headerText="Column Two">
<h:outputText value="#{item.itemTwo}"/>
</ace:column>
</ace:dataTable>
Removing the output text tags, and leaving the bare EL behind fixes the previous snip.
<ace:dataTable id="testTable"
value="#{testBean.itemList}
"
var="item"
stateMap="#
"
selectionMode="single">
<ace:column headerText="Column One"
filterBy="#
#{item.itemOne}
</ace:column>
<ace:column headerText="Column Two">
#
</ace:column>
</ace:dataTable>
When using the broken page markup the response you'd expect to update the second column, looks like:
<partial-response><changes><update id="form:testTable:0:_t11"><Unable to render embedded object: File (testTable:0:_t11">Four</span>]]></update><update id="form:testTable_selection"><) not found.[CDATA[<input id="form:testTable_selection" name="form:testTable_selection" type="hidden" />]]></update><update id="form:testTable_deselection"><Unable to render embedded object: File (testTable_deselection" name="form:testTable_deselection" type="hidden" />]]></update><update id="javax.faces.ViewState"><) not found.[CDATA[-5180981550601262950:-997285592024805949]]></update><eval><![CDATA[ice.applyFocus('form:testTable:j_idt10_filter');]]></eval><extension aceCallbackParam="validationFailed">
{"validationFailed":false}</extension></changes></partial-response>
and when using the altered markup, the update for the same scenario is:
<?xml version='1.0' encoding='UTF-8'?>
<partial-response><changes><update id="form:testTable_row_0"><![CDATA[<tr class=" ui-datatable-even ui-selected ui-state-highlight " id="form:testTable_row_0"><td><div>
Four
</div></td><td><div>
Submitted!
</div></td></tr>]]></update><update id="form:testTable_selection"><Unable to render embedded object: File (testTable_selection" name="form:testTable_selection" type="hidden" />]]></update><update id="form:testTable_deselection"><) not found.[CDATA[<input id="form:testTable_deselection" name="form:testTable_deselection" type="hidden" />]]></update><update id="javax.faces.ViewState"><Unable to render embedded object: File (-2873470306126015661]]></update><eval><) not found.[CDATA[ice.applyFocus('form:testTable:j_idt10_filter');]]></eval><extension aceCallbackParam="validationFailed">
</extension></changes></partial-response>
The table is rendering itself as follows:
old DOM:
<table><thead><tr><th class="ui-widget-header"><div class="ui-header-column" id="form:testTable:j_idt9"><div><span class="ui-header-text">Column One</span></div><input class="ui-column-filter" id="form:testTable:j_idt9_filter" name="form:testTable:j_idt9_filter" onkeyup="widget_form_testTable.filter(event)" size="1" value="o" /></div></th><th class="ui-widget-header"><div class="ui-header-column" id="form:testTable:j_idt11"><div><span class="ui-header-text">Column Two</span></div></div></th></tr></thead><tbody class="ui-datatable-data ui-widget-content" id="form:testTable_data"><tr class=" ui-datatable-even ui-selected ui-state-highlight " id="form:testTable_row_0"><td><div><span id="form:testTable:0:_t10">Four</span></div></td><td><div><span id="form:testTable:0:_t12">Submitted!</span></div></td></tr></tbody></table>
new DOM:
<table><thead><tr><th class="ui-widget-header"><div class="ui-header-column" id="form:testTable:j_idt9"><div><span class="ui-header-text">Column One</span></div><input class="ui-column-filter" id="form:testTable:j_idt9_filter" name="form:testTable:j_idt9_filter" onkeyup="widget_form_testTable.filter(event)" size="1" value="o" /></div></th><th class="ui-widget-header"><div class="ui-header-column" id="form:testTable:j_idt11"><div><span class="ui-header-text">Column Two</span></div></div></th></tr></thead><tbody class="ui-datatable-data ui-widget-content" id="form:testTable_data"><tr class=" ui-datatable-even ui-selected ui-state-highlight " id="form:testTable_row_0"><td><div><span id="form:testTable:0:_t10">One</span></div></td><td><div><span id="form:testTable:0:_t12">Submitted!</span></div></td></tr></tbody></table>
so the "Submitted" value that is new for "One" is not detected as a difference because it was previously rendered in the same row for "Four".
The sequence of events is as follows:
Standard render from submit writes a single row table to the DOM containing "Four Submitted"
Custom render updates the browser (but not the DOM) to show "One"
Standard render from submit writes a single row table to the DOM containing "One Submitted"
The only apparent delta is from "Four" to "One"
The fundamental problem is that the customUpdate does not participate in the standard rendering process.
The customUpdate is as follows:
<extension id="form:testTable" ice.customUpdate="true"><![CDATA[<div id="form:testTable" class="ui-datatable ui-widget"><table><thead><tr><th class="ui-widget-header"><div id="form:testTable:j_idt9" class="ui-header-column"><div><span class="ui-header-text">Column One</span></div><input id="form:testTable:j_idt9_filter" name="form:testTable:j_idt9_filter" class="ui-column-filter" size="1" value="f" onkeyup="widget_form_testTable.filter(event)" /></div></th><th class="ui-widget-header"><div id="form:testTable:j_idt11" class="ui-header-column"><div><span class="ui-header-text">Column Two</span></div></div></th></tr></thead><tbody id="form:testTable_data" class="ui-datatable-data ui-widget-content"><tr id="form:testTable_row_0" class=" ui-datatable-even "><td><div><span id="form:testTable:0:_t10">Four</span></div></td><td><div><span id="form:testTable:0:_t12"></span></div></td></tr></tbody></table><input type="hidden" id="form:testTable_selection" name="form:testTable_selection" /><input type="hidden" id="form:testTable_deselection" name="form:testTable_deselection" /><script type="text/javascript">
//<![CDATA[
widget_form_testTable = new ice.ace.DataTable('form:testTable',
);
//]]>
</script></div>]]></extension>
which is essentially a large DOM update. Could the component be modified to not use customUpdate in this case and just render into the table subtree? customUpdate is really only suitable for transient changes to the page, such as a list of rows to show and hide (even though all rows remained rendered).
Note that the fix for ICE-7364 is causing a regression in this test case due to JavaScript escaping problems.
Resolved in 26100 by changing filter requests to normal DOM updates.
Resolved. Sorting is now refactored to work without customUpdates.
Expansion refactoring still in progress but could be released at this point since its updates don't effect the rest of the table.
Steps to reproduce on test case:
Note: This issue occurs on the first try in the Williams 1Line app.