ICEfaces
  1. ICEfaces
  2. ICE-10434

Deprecate ACE component attributes that overlap with HTML5 passthrough attributes

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 4.0 ACE input components

      Description

      As of ICEfaces 4.0, several ACE input components added new attributes that overlap existing HTML5 passthrough attributes in name and function.

      For example, ace:textEntry supports the following overlapping attributes:
      * placeholder
      * type
      * pattern

      The JSF standard approach to supporting the HTML5 passthrough attributes is to use the "http://xmlns.jcp.org/jsf/passthrough" namespace and declare the passthrough attributes as component attributes. Alternative methods of achieving the same thing are using the "<f:passThroughAttribute>" element and declaring each attribute declaratively, and using the "<f:passThroughAttributes>" element and using a bean property or method on your code that returns a Map<String,String>. In these scenarios, the passthrough attributes are only rendered into the client DOM if specified via the passthrough namespace prefix in the component.

      This mechanism has advantages over the current ICEfaces implementation due to the fact that using the HTML5 passthrough attributes results in different behaviors in the browser vs. normal JSF component attributes, due to the HTML5 client-side processing. This can be detrimental if users are not aware or expecting these behavioural differences when using the built-in component attributes. Requiring developers to specify the passthrough namespace prefix on any HTML5 attributes acts as a tacit acknowledgement by the developer that they wish to use the HTML5 attributes and are aware and expecting the different browser behaviors that will result.
       
      This JIRA is to mark the ACE component attributes that overlap with HTML5 attributes as "deprecated" to encourage users to use the JSF standard approach (via the passthrough namespace) instead (they should continue to function if used, however).

      Note that it also relies on several other JIRAs that must be completed as an atomic unit of work to achieve this transition successfully.

        Issue Links

          Activity

          Hide
          Ken Fyten added a comment -

          This JIRA depends on 2 pre-requisite JIRAs (linked), ICE-10433 and ICE-10430.

          Show
          Ken Fyten added a comment - This JIRA depends on 2 pre-requisite JIRAs (linked), ICE-10433 and ICE-10430 .
          Hide
          Ken Fyten added a comment -

          After further investigation it has been determined that only when running on Mojarra JSF is the HTML5 pass-through attribute library supported. Therefore, we will leave these attributes alone and simply document in the TLD that when running on Mojarra, it is possible to use its' HTML5 passthrough attributes as an alternative to these built-in ones.

          When running on MyFaces, these attributes provide a useful function.

          Show
          Ken Fyten added a comment - After further investigation it has been determined that only when running on Mojarra JSF is the HTML5 pass-through attribute library supported. Therefore, we will leave these attributes alone and simply document in the TLD that when running on Mojarra, it is possible to use its' HTML5 passthrough attributes as an alternative to these built-in ones. When running on MyFaces, these attributes provide a useful function.

            People

            • Assignee:
              Ken Fyten
              Reporter:
              Ken Fyten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: