Details
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.