Details
-
Type: Improvement
-
Status: Closed
-
Priority: 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.
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
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion