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

        Adnan Durrani created issue -
        Adnan Durrani made changes -
        Field Original Value New Value
        Assignee Adnan Durrani [ adnan.durrani ]
        Adnan Durrani made changes -
        Salesforce Case []
        Fix Version/s 1.8.2 [ 10190 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19221 Thu Sep 03 16:11:45 MDT 2009 adnan.durrani Fix for ICE-4916 (Add ids to thead and tfoot elements of the ice:dataTable)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Adnan Durrani made changes -
        Summary Add ids to thead, tbody and tfoot elements of the ice:dataTable Add ids to thead and tfoot elements of the ice:dataTable
        Salesforce Case []
        Description Add ids to thead, tbody and tfoot elements of the ice:dataTable Add ids to thead and tfoot elements of the ice:dataTable
        Adnan Durrani made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        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
        Adnan Durrani made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P1
        Assignee Adnan Durrani [ adnan.durrani ] Yip Ng [ yip.ng ]
        Ken Fyten made changes -
        Comment [ The change for this issue is causing the following regression test failures using IE7 and FF2:

        ICE-3136: failed on IE and FF (works fine on Opera) - column.rendered is not interpreted inside a headerRow element
        ICE-3057: failed - columns are not resizable when resize: true clientOnly: false
        ICE-2371: failed on IE and FF (works fine on Opera) - things wrong with the column headers
        ICE-2234: failed on IE and FF (works fine on Opera) - things wrong with the column headers ]
        Ken Fyten made changes -
        Comment [ A comment with security level 'icesoft-internal-developers' was removed. ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Assignee Priority P1
        Resolution Fixed [ 1 ]
        Assignee Yip Ng [ yip.ng ] Adnan Durrani [ adnan.durrani ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19241 Thu Sep 10 10:39:32 MDT 2009 yip.ng ICE-3943, ICE-4916: 4916 is real cause of regressions, so reinstated 3943 and reverted 4916 instead.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        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.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Adnan Durrani [ adnan.durrani ] Yip Ng [ yip.ng ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19243 Thu Sep 10 16:16:59 MDT 2009 yip.ng ICE-4916: Applied patch from Mircea and reinstate changes from Adnan.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/element.js
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        yip.ng made changes -
        Attachment screenshot-1.png [ 11987 ]
        Attachment screenshot-2.png [ 11988 ]
        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.
        yip.ng made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19890 Tue Dec 08 15:08:57 MST 2009 judy.guglielmin ICE-4481 updates TableRenderer for ICE-5013, ICE-4979, ICE-4916, ICE-3943, ICE-4306
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/TableRenderer.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: