Components with enabledOnUserRole overwrite their model with NULLs
------------------------------------------------------------------
Key: TOMAHAWK-484
URL: http://issues.apache.org/jira/browse/TOMAHAWK-484
Project: MyFaces Tomahawk
Type: Bug
Versions: 1.1.2
Reporter: Val Blant
The use of 'enabledOnUserRole' attribute results in components erroneously
firing their valueChangeListeners and overwriting their value in the model with
NULL.
During the decode phase,
org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.isDisabledOrReadOnly()
method is used to determine if the component for the input field is disabled.
The check is done like this:
isTrue(component.getAttributes().get("disabled"))
However, during the encode stage, we never set setDisabled(true) on the
component! We simply rendered it as disabled in
HtmlRendererUtils.internalRenderSelect(). Therefore the decode phase doesn't
know that the component is disabled and thus sets the submittedValue to null,
which leads to erroneous validation and model update.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira