Index: jsf-api/resources/jsf.js =================================================================== --- jsf-api/resources/jsf.js (revision 7485) +++ jsf-api/resources/jsf.js Wed Jul 08 13:05:38 EEST 2009 @@ -307,13 +307,25 @@ throw new Error("During update: " + id + " not found"); } var parent = d.parentNode; - var temp = document.createElement('div'); - temp.id = d.id; // Trim space padding before assigning to innerHTML - temp.innerHTML = str.replace(/^\s+/g,'').replace(/\s+$/g,''); - + var html = str.replace(/^\s+/g,'').replace(/\s+$/g,''); + var isTableElement = ['td', 'th', 'tr', 'tbody', 'thead', 'tfoot'].indexOf(d.tagName.toLocaleLowerCase()) >= 0; + var temp; + if (isTableElement) { + temp = document.createElement('table'); + temp.innerHTML = html; + var newElement = temp.firstChild; + //some browsers will create also intermediary elements such as table>tbody>tr>td + while ((null != newElement) && (id != newElement.id)) { + newElement = newElement.firstChild; + } + parent.replaceChild(newElement, d); + } else { + temp = document.createElement('div'); + temp.innerHTML = html; - parent.replaceChild(temp.firstChild, d); - } + parent.replaceChild(temp.firstChild, d); + } + } }; /**