Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.BETA, 4.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      all
    • Assignee Priority:
      P2

      Description

      Reduce size of rendered markup, especially the IDs and JS event handlers.

        Issue Links

          Activity

          Mircea Toma created issue -
          Mircea Toma made changes -
          Field Original Value New Value
          Link This issue blocks ICE-11113 [ ICE-11113 ]
          Ken Fyten made changes -
          Assignee Mircea Toma [ mircea.toma ]
          Fix Version/s 4.2 [ 12870 ]
          Assignee Priority P2 [ 10011 ]
          Hide
          Mircea Toma added a comment -

          I have looked into reducing the size of the markup by way of shortening (as much as theoretically possible) the client IDs. As a simple test all the assigned IDs were removed from the templates thus forcing JSF to generate unique IDs. These generated IDs are much shorted (although not the shortest possible). Comparing the size of the markup rendered with long IDs vs short IDs shown savings of around 1.5%. The savings in the amount of markup don't seem to justify spending any more effort in this direction. Also, the implementation would be quite difficult since JSF does rely on the parse-ablity of the client IDs (similar to a path structure).

          Show
          Mircea Toma added a comment - I have looked into reducing the size of the markup by way of shortening (as much as theoretically possible) the client IDs. As a simple test all the assigned IDs were removed from the templates thus forcing JSF to generate unique IDs. These generated IDs are much shorted (although not the shortest possible). Comparing the size of the markup rendered with long IDs vs short IDs shown savings of around 1.5%. The savings in the amount of markup don't seem to justify spending any more effort in this direction. Also, the implementation would be quite difficult since JSF does rely on the parse-ablity of the client IDs (similar to a path structure).
          Hide
          Mircea Toma added a comment - - edited

          Another method to reduce the size of the markup is to factor out functions for the JS event listeners and/or the inline JS script code. The savings are even more significant when these components are used inside iterating parents (such as data tables).
          The following components are best suited to have their renderers refactored: ace:autoCompleteEntry, ace:dataTable, ace:fileEntry, ace:accordion, ace:menuButton, ace:panel, ace:toolTip, ace:menu.

          Show
          Mircea Toma added a comment - - edited Another method to reduce the size of the markup is to factor out functions for the JS event listeners and/or the inline JS script code. The savings are even more significant when these components are used inside iterating parents (such as data tables). The following components are best suited to have their renderers refactored: ace:autoCompleteEntry , ace:dataTable , ace:fileEntry , ace:accordion , ace:menuButton , ace:panel , ace:toolTip , ace:menu .
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49123 Mon Aug 29 11:45:23 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/accordion/accordion.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/accordion/AccordionRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49124 Mon Aug 29 12:04:26 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/autocompleteentry/autocompleteentry.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49125 Mon Aug 29 14:34:19 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tooltip/TooltipRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tooltip/tooltip.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49126 Mon Aug 29 15:30:30 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableHeadRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49127 Mon Aug 29 16:18:30 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/fileentry/fileEntry.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49131 Tue Aug 30 06:10:04 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/util/blockui.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49132 Tue Aug 30 06:36:02 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/menubutton/MenuButtonRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/menu/menu.js
          Hide
          Carmen Cristurean added a comment - - edited

          Jenkins IF4 trunk Build #2063/Tomcat7.0.42 testing found the following regressions:

          1) Showcase - General Search function issue
          When navigating to a component demo via the search function, the left-side menu panel corresponding to the group of components does not open up.
          As example, when searching and selecting ace:autoCompleteEntry > Overview, the corresponding demo is rendered, however the panel for the "Input" type components does not open up to show all other demos for autoCompleteEntry.
          This issue cannot be reproduced with Jenkins build #2056.

          2) Showcase > Tooltip > Global
          On demo page load, a JS error is written to the browser console (all browsers). This issue also, cannot be reproduced with Jenkins build #2056.
          FF47:
          SyntaxError: missing ] in computed property name
          http://localhost:8080/showcase/showcase.jsf?grp=ace:tooltip&exp=Global
          Line 241

          IE11:
          SCRIPT1028: Expected identifier, string or number
          File: showcase.jsf, Line: 1, Column: 153

          Chrome:
          VM190:1 Uncaught SyntaxError: Unexpected token ,runScripts @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:626doUpdate @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1476response @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:2865onComplete @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1779AjaxEngine.req.xmlReq.onreadystatechange @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1760

          3) ace:tooltip QA test application/ Tooltip Iterative Selection test fails:
          The tooltips must display an image with the "Icesoft Technologies" logo, and they fail following the changes for this JIRA.
          QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/tooltip
          Demo: /tooltipSelectIterative.jsf

          Show
          Carmen Cristurean added a comment - - edited Jenkins IF4 trunk Build #2063/Tomcat7.0.42 testing found the following regressions: 1) Showcase - General Search function issue When navigating to a component demo via the search function, the left-side menu panel corresponding to the group of components does not open up. As example, when searching and selecting ace:autoCompleteEntry > Overview, the corresponding demo is rendered, however the panel for the "Input" type components does not open up to show all other demos for autoCompleteEntry. This issue cannot be reproduced with Jenkins build #2056. 2) Showcase > Tooltip > Global On demo page load, a JS error is written to the browser console (all browsers). This issue also, cannot be reproduced with Jenkins build #2056. FF47: SyntaxError: missing ] in computed property name http://localhost:8080/showcase/showcase.jsf?grp=ace:tooltip&exp=Global Line 241 IE11: SCRIPT1028: Expected identifier, string or number File: showcase.jsf, Line: 1, Column: 153 Chrome: VM190:1 Uncaught SyntaxError: Unexpected token ,runScripts @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:626doUpdate @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1476response @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:2865onComplete @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1779AjaxEngine.req.xmlReq.onreadystatechange @ jsf.js.jsf?ln=javax.faces&stage=Development&v=4_2_0_160830:1760 3) ace:tooltip QA test application/ Tooltip Iterative Selection test fails: The tooltips must display an image with the "Icesoft Technologies" logo, and they fail following the changes for this JIRA. QA app: http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/tooltip Demo: /tooltipSelectIterative.jsf
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49142 Wed Aug 31 15:36:48 MDT 2016 mircea.toma ICE-11116 Ensure that 'txt' for ice.ace.Tooltip.activate function is always rendered.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tooltip/TooltipRenderer.java
          Hide
          Mircea Toma added a comment -

          Fixed 2) by ensuring that 'txt' parameter for ice.ace.Tooltip.activate function is always added.

          Show
          Mircea Toma added a comment - Fixed 2) by ensuring that 'txt' parameter for ice.ace.Tooltip.activate function is always added.
          Hide
          Mircea Toma added a comment -

          Fixed 3) by running body of ice.ace.Tooltip.activate function as a closure called by ice.ace.jq (just the way it was called before the refactoring).

          Show
          Mircea Toma added a comment - Fixed 3) by running body of ice.ace.Tooltip.activate function as a closure called by ice.ace.jq (just the way it was called before the refactoring).
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49143 Wed Aug 31 15:54:27 MDT 2016 mircea.toma ICE-11116 Run body of ice.ace.Tooltip.activate function as a closure called by ice.ace.jq.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tooltip/tooltip.js
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49144 Wed Aug 31 16:38:10 MDT 2016 mircea.toma ICE-11116 Simplify code.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/tooltip/tooltip.js
          Hide
          Carmen Cristurean added a comment -

          Verified 2) and 3) with IF4 trunk r.49144 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.

          Show
          Carmen Cristurean added a comment - Verified 2) and 3) with IF4 trunk r.49144 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.
          Hide
          Mircea Toma added a comment - - edited

          Fix 1) by passing the select index parameter as type number (not string) into ice.ace.AccordionPanel.activate function.

          Show
          Mircea Toma added a comment - - edited Fix 1) by passing the select index parameter as type number (not string) into ice.ace.AccordionPanel.activate function.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49148 Thu Sep 01 13:53:53 MDT 2016 mircea.toma ICE-11116 Fix accordion opening by passing the select index parameter as type number (not string).
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/accordion/AccordionRenderer.java
          Mircea Toma made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #49155 Thu Sep 01 17:55:31 MDT 2016 mircea.toma ICE-11116 Factor out JS inline code into library function.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/submenu/Submenu.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/menu/menu.js
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/menu/BaseMenuRenderer.java
          Hide
          Carmen Cristurean added a comment -

          Verified 1) with IF4 trunk r.49159 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.

          Show
          Carmen Cristurean added a comment - Verified 1) with IF4 trunk r.49159 on IE8/11, MS Edge, FF47, Chrome52/Tomcat7.0.42.
          Ken Fyten made changes -
          Fix Version/s 4.2.BETA [ 13091 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Mircea Toma
              Reporter:
              Mircea Toma
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: