Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.1.2
-
None
-
None
-
Client: Windows XT/Firefox 2.0.0.9
Server: Windows XT/JBoss 4.0.4
Tapestry: 4.1.2
Description
The extractData method of the XTile component doesn't handle AJAX responses larger than 4096 bytes when using the XMLHttpRequest object - as opposed to the ActiveXObjects.
The problem is that extractData - as defined in XTile.script - only looks at the firstChild of the <sp> element as shown in the following code snippet:
function extractData(response)
{
var xml = response.responseXML.documentElement;
var dataList = new Array();
if (xml) dataList = xml.getElementsByTagName('sp');
var dataLen = dataList.length;
var data = new Array();
for (i = 0; i < dataLen; i++)
return data;
}
The following version of extractData fixes the problem by iterating over all children of the <sp> node:
function extractData(response)
{
var xml = response.responseXML.documentElement;
var dataList = new Array();
if (xml)
var dataLen = dataList.length;
var data = new Array();
for (i = 0; i < dataLen; i++) {
var children = dataList[i].childNodes;
data[i] = "";
for (j = 0; j < children.length; j++) {
var child = children[j];
if (child)
}
}
return data;
}
Tested in both IE and Firefox and this change works properly in both cases.
Attachments
Issue Links
- is a clone of
-
TAPESTRY-961 Large XTile responses not parsed correctly (FireFox 1.5)
- Resolved