ICEfaces
  1. ICEfaces
  2. ICE-3346

Pass-through Attribute Optimization and Rationalization

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.8DR#1, 1.8
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      Passthru attributes

      Description

      Improve passThru attributes rendering

        Issue Links

          Activity

          Hide
          Adnan Durrani added a comment -

          revision 17233.
          List has been replaced with sorted array and some stale code has been removed from the different renderers.

          Show
          Adnan Durrani added a comment - revision 17233. List has been replaced with sorted array and some stale code has been removed from the different renderers.
          Hide
          Adnan Durrani added a comment -

          revision: 17243
          The com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer has been changed, There are two code paths added. The first one look for if the supportedPassThru attribute list is defined on the component, if so then iterate through the supported attributes list else iterate through the list of all possible passThru attribute list.

          So in the components we just need to define an array of supported passThru attributes and it must needs to have a getter with the following name. This array should not have any effect related attribute.

          private static String[] supportedPassThru =

          { "title", "dir", "lang", "style" }

          ;

          public String[] getSupportedPassThru()

          { return supportedPassThru; }
          Show
          Adnan Durrani added a comment - revision: 17243 The com.icesoft.faces.renderkit.dom_html_basic.PassThruAttributeRenderer has been changed, There are two code paths added. The first one look for if the supportedPassThru attribute list is defined on the component, if so then iterate through the supported attributes list else iterate through the list of all possible passThru attribute list. So in the components we just need to define an array of supported passThru attributes and it must needs to have a getter with the following name. This array should not have any effect related attribute. private static String[] supportedPassThru = { "title", "dir", "lang", "style" } ; public String[] getSupportedPassThru() { return supportedPassThru; }
          Hide
          Frank Ye added a comment -

          Documented Approach:

          The Helper class will be separated into two AttributeConstants H: and ExtendedAttributeConstants ICE:. H: does not change over time. Each ICE: needs a new one. This helps with build cycle.

          com.icesoft.faces.components.AttributeConstants
          com.icesoft.faces.components.ExtendedAttributeConstants

          Pass thru attributes:

          A list of attributes from w3c html attributes where component has concrete implementation, the attribute in the list doe not need to handled specifically. the attribute contain String and integer type only, no other types.

          Coding style with PassThruAttributes in Renderer, the following suggestion as a format (not only for Performance, but also as coding style to avoid further confusion). This includes using the entire list as well.

          Each Renderer if required to output PassThruAttributes.

          For example:

          //private static final String[] passThruAttributes = AttributeConstants.getAttributes(AttributeCOnstants.H_COMMANDBUTTON);
          //handled "type",
          private static final String[] passThruAttributes = new String

          {"","",""}

          ;

          handle specific code. getType outout
          PassThruAttributeRenderer.renderHtmlAttributes(facesContext, uiComponent, passThruAttributes);

          Show
          Frank Ye added a comment - Documented Approach: The Helper class will be separated into two AttributeConstants H: and ExtendedAttributeConstants ICE:. H: does not change over time. Each ICE: needs a new one. This helps with build cycle. com.icesoft.faces.components.AttributeConstants com.icesoft.faces.components.ExtendedAttributeConstants Pass thru attributes: A list of attributes from w3c html attributes where component has concrete implementation, the attribute in the list doe not need to handled specifically. the attribute contain String and integer type only, no other types. Coding style with PassThruAttributes in Renderer, the following suggestion as a format (not only for Performance, but also as coding style to avoid further confusion). This includes using the entire list as well. Each Renderer if required to output PassThruAttributes. For example: //private static final String[] passThruAttributes = AttributeConstants.getAttributes(AttributeCOnstants.H_COMMANDBUTTON); //handled "type", private static final String[] passThruAttributes = new String {"","",""} ; handle specific code. getType outout PassThruAttributeRenderer.renderHtmlAttributes(facesContext, uiComponent, passThruAttributes);
          Hide
          Frank Ye added a comment -

          difference when comparing with jsf1.2_09 AttributeManager, AttributeConstants has more attributes:

          CommandLink:
          target

          OutputLink:
          target

          SelectManyCheckbox:
          style

          SelectOneRadio:
          style

          Show
          Frank Ye added a comment - difference when comparing with jsf1.2_09 AttributeManager, AttributeConstants has more attributes: CommandLink: target OutputLink: target SelectManyCheckbox: style SelectOneRadio: style
          Hide
          Frank Ye added a comment -

          ExtendedAttributeConstants is the last one using Generator.
          revision 17349.

          Show
          Frank Ye added a comment - ExtendedAttributeConstants is the last one using Generator. revision 17349.
          Hide
          Frank Ye added a comment -

          fix metadata jsf12 difference

          Show
          Frank Ye added a comment - fix metadata jsf12 difference
          Hide
          Mark Collette added a comment -

          TRUNK
          Subversion 17454
          icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java
          icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GridRenderer.java
          icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GroupRenderer.java
          icefaces\component\src\com\icesoft\faces\component\ExtendedAttributeConstants.java
          icefaces\component\src\com\icesoft\faces\component\panelborder\PanelBorderRenderer.java
          icefaces\component\src\com\icesoft\faces\component\paneldivider\PanelDividerRenderer.java
          icefaces\component\src\com\icesoft\faces\component\panelpopup\PanelPopupRenderer.java
          icefaces\component\src\com\icesoft\faces\component\panelstack\PanelStackRenderer.java
          icefaces\component\src\com\icesoft\faces\component\paneltooltip\PanelTooltipRenderer.java
          icefaces\core\src\com\icesoft\faces\component\AttributeConstants.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\GridRenderer.java
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\GroupRenderer.java

          Show
          Mark Collette added a comment - TRUNK Subversion 17454 icefaces\component\src\com\icesoft\faces\component\datapaginator\DataPaginatorRenderer.java icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GridRenderer.java icefaces\component\src\com\icesoft\faces\component\ext\renderkit\GroupRenderer.java icefaces\component\src\com\icesoft\faces\component\ExtendedAttributeConstants.java icefaces\component\src\com\icesoft\faces\component\panelborder\PanelBorderRenderer.java icefaces\component\src\com\icesoft\faces\component\paneldivider\PanelDividerRenderer.java icefaces\component\src\com\icesoft\faces\component\panelpopup\PanelPopupRenderer.java icefaces\component\src\com\icesoft\faces\component\panelstack\PanelStackRenderer.java icefaces\component\src\com\icesoft\faces\component\paneltooltip\PanelTooltipRenderer.java icefaces\core\src\com\icesoft\faces\component\AttributeConstants.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\GridRenderer.java icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\GroupRenderer.java
          Hide
          Frank Ye added a comment -

          All renderer is updated, so closed

          Show
          Frank Ye added a comment - All renderer is updated, so closed
          Hide
          Mark Collette added a comment -

          Fix the ImageRenderer ismap handling to follow the w3c spec, and handle null values.

          TRUNK
          Subversion 17779
          icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\ImageRenderer.java

          Show
          Mark Collette added a comment - Fix the ImageRenderer ismap handling to follow the w3c spec, and handle null values. TRUNK Subversion 17779 icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\ImageRenderer.java

            People

            • Assignee:
              Unassigned
              Reporter:
              Adnan Durrani
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: