ICEfaces
  1. ICEfaces
  2. ICE-10433

Normalize component support for HTML5 Passthrough attributes

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: EE-4.0.0.GA, 4.1
    • Labels:
      None
    • Environment:
      ICEfaces 4 ACE and MOBI Components
    • Assignee Priority:
      P1

      Description

      Currently, HTML5 passthrough attributes are being rendered out into the outer-most/first rendered DOM element rendered by the component. This appears to be an automatic rendering behaviour done by JSF 2.2.

      Unfortunately, this results in none-operative pass-through attributes as the ACE and MOBI components typically use multiple levels of elements in their rendering, including a top-level SPAN or DIV that surrounds the component. Thus, the pass-through attributes are ending up on the SPAN or DIV and not targeted to the functional input or button elements where they would be functional.

      This JIRA is to make whatever changes are necessary in the ACE and MOBI components to have the pass-through attributes rendered onto the logical functional input element rendered by each component.

        Issue Links

          Activity

          Ken Fyten created issue -
          Ken Fyten made changes -
          Field Original Value New Value
          Fix Version/s EE-4.0.0.GA [ 11171 ]
          Hide
          Ken Fyten added a comment -

          Example A (ace:textAreaEntry w/ p:placeholder="placeholder")

          <span id="form2:emailInput" placeholder="placeholder">
          <span id="form2:emailInput_markup" class="ui-textareaentry-container">
          <textarea id="form2:emailInput_input" class="ui-inputfield ui-textareaentry ui-widget ui-state-default ui-corner-all ui-state-optional ui-textareaentry-resizable" role="textbox" placeholder="placeholder" onfocus="var widget_form2_emailInput = ice.ace.lazy("TextAreaEntry",["form2:emailInput",{"inFieldLabelStyleClass":"ui-input-label-infield","maxlength":0,"placeholder":"placeholder"}]);" name="form2:emailInput_input" aria-multiline="true"/>
          </span>

          In this scenario, the "p:placeholder" attribute is being picked up by both the JSF passthrough attribute handler, which is adding it to the outer SPAN element, and also by the ace:textAreaEntry component itself (which has a "placeholder" attribute), which renders it onto the TEXTAREA element. It appears that the component ignores any namespace prefix on the attribute name and simply processes it as it's own attribute, whether or not a valid namespace prefix exists in front of it.

          Example B (ace:textAreaEntry w/ placeholder="placeholder")

          <span id="form2:emailInput">
          <span id="form2:emailInput_markup" class="ui-textareaentry-container">
          <textarea id="form2:emailInput_input" class="ui-inputfield ui-textareaentry ui-widget ui-state-default ui-corner-all ui-state-optional ui-textareaentry-resizable" role="textbox" placeholder="placeholder" onfocus="var widget_form2_emailInput = ice.ace.lazy("TextAreaEntry",["form2:emailInput",{"inFieldLabelStyleClass":"ui-input-label-infield","maxlength":0,"placeholder":"placeholder"}]);" name="form2:emailInput_input" aria-multiline="true"/> 

          Here we see the component processing the attribute as it's own, which is the expected behaviour in this scenario.

          Show
          Ken Fyten added a comment - Example A (ace:textAreaEntry w/ p:placeholder="placeholder") <span id= "form2:emailInput" placeholder= "placeholder" > <span id= "form2:emailInput_markup" class= "ui-textareaentry-container" > <textarea id= "form2:emailInput_input" class= "ui-inputfield ui-textareaentry ui-widget ui-state- default ui-corner-all ui-state-optional ui-textareaentry-resizable" role= "textbox" placeholder= "placeholder" onfocus= " var widget_form2_emailInput = ice.ace.lazy(" TextAreaEntry ",[" form2:emailInput ",{" inFieldLabelStyleClass ":" ui-input-label-infield "," maxlength ":0," placeholder ":" placeholder "}]);" name= "form2:emailInput_input" aria-multiline= " true " /> </span> In this scenario, the "p:placeholder" attribute is being picked up by both the JSF passthrough attribute handler, which is adding it to the outer SPAN element, and also by the ace:textAreaEntry component itself (which has a "placeholder" attribute), which renders it onto the TEXTAREA element. It appears that the component ignores any namespace prefix on the attribute name and simply processes it as it's own attribute, whether or not a valid namespace prefix exists in front of it. Example B (ace:textAreaEntry w/ placeholder="placeholder") <span id= "form2:emailInput" > <span id= "form2:emailInput_markup" class= "ui-textareaentry-container" > <textarea id= "form2:emailInput_input" class= "ui-inputfield ui-textareaentry ui-widget ui-state- default ui-corner-all ui-state-optional ui-textareaentry-resizable" role= "textbox" placeholder= "placeholder" onfocus= " var widget_form2_emailInput = ice.ace.lazy(" TextAreaEntry ",[" form2:emailInput ",{" inFieldLabelStyleClass ":" ui-input-label-infield "," maxlength ":0," placeholder ":" placeholder "}]);" name= "form2:emailInput_input" aria-multiline= " true " /> Here we see the component processing the attribute as it's own, which is the expected behaviour in this scenario.
          Ken Fyten made changes -
          Link This issue blocks ICE-10434 [ ICE-10434 ]
          Ken Fyten made changes -
          Assignee Judy Guglielmin [ judy.guglielmin ]
          Assignee Priority P1 [ 10010 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #43977 Thu Jan 29 12:00:03 MST 2015 judy.guglielmin ICE-10430 and ICE-10433 first support of jsf 2.2 passthrough attribute library and ensuring the required and requiredMessage of UIInput is functional for these components. As well, deprecate any attributes on the components used for existing html5 attribute support.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/util/PassThruAttributeWriter.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/maskedentry/MaskedEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxRenderer.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntry.java
          Hide
          Judy Guglielmin added a comment -

          rev 43977 for source, rev 40584 for qa test

          Show
          Judy Guglielmin added a comment - rev 43977 for source, rev 40584 for qa test
          Judy Guglielmin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #44003 Tue Feb 03 16:54:31 MST 2015 ken.fyten ICE-10434, ICE-10433: Reverted Deprecation notice in the TLD, and added note specifying that the equiv. Mojarra HTML5 passthrough attribute can be used as an alternative instead.
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textentry/TextEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/autocompleteentry/AutoCompleteEntryMeta.java
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/src/org/icefaces/ace/component/combobox/ComboBoxMeta.java
          Hide
          Liana Munroe added a comment -

          Verified ICEfaces 4 trunk r44012. Tomcat 7, IE 11, Chrome 40, FF 34. After speaking with Judy it was confirmed that some attributes such as placeholder may still appear in the higher level span as well as at the input level.

          Show
          Liana Munroe added a comment - Verified ICEfaces 4 trunk r44012. Tomcat 7, IE 11, Chrome 40, FF 34. After speaking with Judy it was confirmed that some attributes such as placeholder may still appear in the higher level span as well as at the input level.
          Ken Fyten made changes -
          Fix Version/s 4.1 [ 11375 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: