ICEfaces
  1. ICEfaces
  2. ICE-4916

Add ids to thead and tfoot elements of the ice:dataTable

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      ice:dataTable + id

      Description

      Add ids to thead and tfoot elements of the ice:dataTable

        Activity

        Hide
        Adnan Durrani added a comment -

        Fixed:

        Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java
        Completed: At revision: 19221

        Show
        Adnan Durrani added a comment - Fixed: Modified: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Sending content: D:\work\development\head\svn\ossrepo\icefaces\trunk\icefaces\component\src\com\icesoft\faces\component\ext\renderkit\TableRenderer.java Completed: At revision: 19221
        Hide
        Ken Fyten added a comment -

        This change is causing regressions in certain browsers (all but Opera) and has been backed out.

        Show
        Ken Fyten added a comment - This change is causing regressions in certain browsers (all but Opera) and has been backed out.
        Hide
        Ken Fyten added a comment -

        Ted Goddard says:

        Apparently we're not going to replace tfoot or thead

        http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx

        The property is read/write for all objects except the following, for which it is read-only: COL, COLGROUP,FRAMESET, HEAD, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value.

        Here's the trick we use to update tables in element.js:

        This.TableCellElement = This.Element.subclass({
        replaceHtml: function(html) {
        this.withTemporaryContainer(function(container) {
        container.innerHTML = '<TABLE>' + html + '</TABLE>';
        var newElement = container.firstChild;
        while ((null != newElement) && (this.element.id != newElement.id))

        { newElement = newElement.firstChild; }

        this.disconnectEventListeners();
        this.replaceHostElementWith(newElement);
        });
        }
        });

        We may be able to do something similar with tfoot and thead.

        Or, it may be easier to ensure in the application that contents of
        the tfoot being updated have IDs within the table cells.

        Show
        Ken Fyten added a comment - Ted Goddard says: Apparently we're not going to replace tfoot or thead http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx The property is read/write for all objects except the following, for which it is read-only: COL, COLGROUP,FRAMESET, HEAD, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value. Here's the trick we use to update tables in element.js: This.TableCellElement = This.Element.subclass({ replaceHtml: function(html) { this.withTemporaryContainer(function(container) { container.innerHTML = '<TABLE>' + html + '</TABLE>'; var newElement = container.firstChild; while ((null != newElement) && (this.element.id != newElement.id)) { newElement = newElement.firstChild; } this.disconnectEventListeners(); this.replaceHostElementWith(newElement); }); } }); We may be able to do something similar with tfoot and thead. Or, it may be easier to ensure in the application that contents of the tfoot being updated have IDs within the table cells.
        Hide
        yip.ng added a comment - - edited

        See screenshots 1 and 2 for the DOM update problem. <thead>, <tr> and <th> are all stripped. All that is left is the <span>.

        See ICE-3943 for the list of regressions.

        Show
        yip.ng added a comment - - edited See screenshots 1 and 2 for the DOM update problem. <thead>, <tr> and <th> are all stripped. All that is left is the <span>. See ICE-3943 for the list of regressions.
        Hide
        yip.ng added a comment -

        Ted Goddard says:

        It may be sufficient for them to use ice:outputText rather than h:outputText (the ice: components insert IDs).

        Show
        yip.ng added a comment - Ted Goddard says: It may be sufficient for them to use ice:outputText rather than h:outputText (the ice: components insert IDs).
        Hide
        yip.ng added a comment -

        Patch from Mircea:

        — bridge/lib/element.js (revision 19228)
        +++ bridge/lib/element.js (working copy)
        @@ -225,6 +225,9 @@
        switch (e.tagName.toLowerCase()) {
        case 'textarea':
        case 'input': return new This.InputElement(e);
        + case 'thead':
        + case 'tfoot':
        + case 'tbody':
        case 'th':
        case 'td':
        case 'tr': return new This.TableCellElement(e);

        Show
        yip.ng added a comment - Patch from Mircea: — bridge/lib/element.js (revision 19228) +++ bridge/lib/element.js (working copy) @@ -225,6 +225,9 @@ switch (e.tagName.toLowerCase()) { case 'textarea': case 'input': return new This.InputElement(e); + case 'thead': + case 'tfoot': + case 'tbody': case 'th': case 'td': case 'tr': return new This.TableCellElement(e);
        Hide
        yip.ng added a comment -

        Applied patch from Mircea and reinstated Adnan's changes.

        Show
        yip.ng added a comment - Applied patch from Mircea and reinstated Adnan's changes.

          People

          • Assignee:
            yip.ng
            Reporter:
            Adnan Durrani
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: