ICEfaces
  1. ICEfaces
  2. ICE-11379

using <ace:cellEditor> with <ace:dataTable ...scrollable="true"../> causes illegible characters while page is loading

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P05
    • Fix Version/s: 4.3, EE-3.3.0.GA_P06
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ace

      Description

      see attached test sample ...\SC14260\home.xhtml

      as well as attached document of screen shot.
      When removing scrollable="true" all is good.

      1. DataTable Large DataSet Issue.docx
        253 kB
        Judy Guglielmin

        Issue Links

          Activity

          Judy Guglielmin created issue -
          Judy Guglielmin made changes -
          Field Original Value New Value
          Assignee Arturo Zambrano [ artzambrano ]
          Judy Guglielmin made changes -
          Fix Version/s EE-3.3.0.GA_P07 [ 13118 ]
          Hide
          Judy Guglielmin added a comment -

          test app use ...SC14260\home.xhtml

          Show
          Judy Guglielmin added a comment - test app use ...SC14260\home.xhtml
          Judy Guglielmin made changes -
          Attachment SC14260.war [ 22684 ]
          Judy Guglielmin made changes -
          Attachment DataTable Large DataSet Issue.docx [ 22685 ]
          Attachment SC_14262_datatableTest.zip [ 22686 ]
          Hide
          Arturo Zambrano added a comment - - edited

          What is being seen is not a blur effect or anything like that. When a scrollable table is loaded, it goes through several positioning calculations to align the headers to the body columns. For a brief moment all body columns lose their original widths and thus they all appear crammed in the viewport width, while each of them gets its specific width that will align it to its corresponding header. This situation is only visible on tables that have a high number of columns and that are much wider than the viewport. The only work around is to temporarily conceal the table body, so that the table appears blank while all these calculations take place. After all columns have their correct widths set, then the table contents are shown again all aligned. This can be accomplished with the following client side code:

          1. Add styleClass="conceal-body-contents" to the ace:dataTable component.

          2. Add the following <style> element in the header of the page.

          <style type="text/css">
          .conceal-body-contents .ui-datatable-scrollable-body .ui-widget-content {
          visibility: hidden;
          }
          </style>
          

          3. Add an id to the ace:dataTable component and to its parent h:form, so we can have a predictable client id for the table. In this example, we simply set them to 'table' and 'form', respectively.

          4. Add the following <script> element at the end of the page.

          <script type="text/javascript">
          setTimeout(function(){
          	ice.ace.jq(ice.ace.escapeClientId('form:table')).removeClass('conceal-body-contents');
          }, 1000);
          </script>
          

          5. Don't forget to set the ace:dataTable component to scrollable="true" to actually test this workaround.

          So, what this code does is to set the body table to invisible. However, it still takes space, so that our code can do all the alignment calculations correctly. After these calculations are finished, we remove the style class that caused the body table to be invisible, and, thus, the table is finally revealed all aligned correctly.

          There's no hook to execute this code right after all the alignment calculations, so we assume they will take no longer than one second, which is a conservative assumption.

          I verified that this situation only happens when loading the page and not when resizing the window.

          Show
          Arturo Zambrano added a comment - - edited What is being seen is not a blur effect or anything like that. When a scrollable table is loaded, it goes through several positioning calculations to align the headers to the body columns. For a brief moment all body columns lose their original widths and thus they all appear crammed in the viewport width, while each of them gets its specific width that will align it to its corresponding header. This situation is only visible on tables that have a high number of columns and that are much wider than the viewport. The only work around is to temporarily conceal the table body, so that the table appears blank while all these calculations take place. After all columns have their correct widths set, then the table contents are shown again all aligned. This can be accomplished with the following client side code: 1. Add styleClass="conceal-body-contents" to the ace:dataTable component. 2. Add the following <style> element in the header of the page. <style type= "text/css" > .conceal-body-contents .ui-datatable-scrollable-body .ui-widget-content { visibility: hidden; } </style> 3. Add an id to the ace:dataTable component and to its parent h:form, so we can have a predictable client id for the table. In this example, we simply set them to 'table' and 'form', respectively. 4. Add the following <script> element at the end of the page. <script type= "text/javascript" > setTimeout(function(){ ice.ace.jq(ice.ace.escapeClientId('form:table')).removeClass('conceal-body-contents'); }, 1000); </script> 5. Don't forget to set the ace:dataTable component to scrollable="true" to actually test this workaround. So, what this code does is to set the body table to invisible. However, it still takes space, so that our code can do all the alignment calculations correctly. After these calculations are finished, we remove the style class that caused the body table to be invisible, and, thus, the table is finally revealed all aligned correctly. There's no hook to execute this code right after all the alignment calculations, so we assume they will take no longer than one second, which is a conservative assumption. I verified that this situation only happens when loading the page and not when resizing the window.
          Arturo Zambrano made changes -
          Attachment home-workaround.xhtml [ 22689 ]
          Arturo Zambrano made changes -
          Workaround Description Temporarily conceal the contents of the table body when the page is loading, as explained by the comment below.
          Workaround Exists Yes [ 10007 ]
          Arturo Zambrano made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Won't Fix [ 2 ]
          Arturo Zambrano made changes -
          Resolution Won't Fix [ 2 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Arturo Zambrano added a comment -

          r51184: removed style class used by scrollable body table that contained 'table-layout:fixed;', since it was causing all cells to be crammed into the viewpoert width. Moreover, it's not necessary, since the table itself receives the styling 'table-layout:auto;' in its style attribute when doing the resizeScrolling() calculations

          It turns out that having 'table-layout:fixed;' was causing the issue, and it was caused from the moment the HTML was loaded, not when performing the resizeScrolling() calculations. It doesn't seem to be necessary at all, since that styling is overridden by 'table-layout:auto;' on the style attribute of the table.

          Show
          Arturo Zambrano added a comment - r51184: removed style class used by scrollable body table that contained 'table-layout:fixed;', since it was causing all cells to be crammed into the viewpoert width. Moreover, it's not necessary, since the table itself receives the styling 'table-layout:auto;' in its style attribute when doing the resizeScrolling() calculations It turns out that having 'table-layout:fixed;' was causing the issue, and it was caused from the moment the HTML was loaded, not when performing the resizeScrolling() calculations. It doesn't seem to be necessary at all, since that styling is overridden by 'table-layout:auto;' on the style attribute of the table.
          Arturo Zambrano made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Arturo Zambrano made changes -
          Attachment home-workaround.xhtml [ 22689 ]
          Ken Fyten made changes -
          Affects Compatibility/Configuration [ 10002 ]
          Hide
          Ken Fyten added a comment -

          Re-opened for 4.3.

          Show
          Ken Fyten added a comment - Re-opened for 4.3.
          Ken Fyten made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ken Fyten made changes -
          Fix Version/s 4.3 [ 13096 ]
          Hide
          Arturo Zambrano added a comment -

          r52186: committed fix to 4.0 trunk

          Show
          Arturo Zambrano added a comment - r52186: committed fix to 4.0 trunk
          Arturo Zambrano made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #52186 Fri Dec 22 15:35:10 MST 2017 art.zambrano ICE-11379 removed style class used by scrollable body table that contained 'table-layout:fixed;', since it was causing all cells to be crammed into the viewpoert width. Moreover, it's not necessary, since the table itself receives the styling 'table-layout:auto;' in its style element when doing the resizeScrolling() calculations
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.css
          Arturo Zambrano made changes -
          Link This issue blocks ICE-11381 [ ICE-11381 ]
          Ken Fyten made changes -
          Fix Version/s EE-3.3.0.GA_P06 [ 13114 ]
          Fix Version/s EE-3.3.0.GA_P07 [ 13118 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Judy Guglielmin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: