Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3957

Disabled h:commandLink results in rendering of a span with onclick

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.0.24, 2.1.18, 2.2.9
    • None
    • None
    • Websphere 8.5

    Description

                <h:commandLink disabled="true" onclick="alert('hello')" type="button">link</h:commandLink>
      AND
                <h:commandLink disabled="true" onclick="alert('hello')" type="button" value="link" />
      

      Result in:

      <span onclick="alert('hello')" type="button">link</span>
      

      I would have expected to find a disabled <a ...></a> or a span without the onclick action.

      In comparison a disabled h:commandButton:

      <h:commandButton disabled="true" value="button" onclick="alert('hello')" type="button"/>
      

      Results in:

      <input name="frmContent:j_id499838546_62f34114" disabled="disabled" id="frmContent:j_id499838546_62f34114" onclick="alert('hello')" type="button" value="button"></input>
      

      As expected the onclick action is not preformed.

      I would expect similar behaviour from both h:commandButton and h:commandLink.

      Attachments

        1. MYFACES-3957.patch
          4 kB
          Thomas Andraschko

        Activity

          People

            lu4242 Leonardo Uribe
            sknitelius Stephan Knitelius
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: