volosied commented on PR #492:
URL: https://github.com/apache/myfaces/pull/492#issuecomment-1398707459
Mojarra's steps:
1) MenuRenderer#decodeGroup -- submitted value is set to
RIConstants.NO_VALUE ("") -
https://github.com/eclipse-ee4j/mojarra/blob/3fd5d16cc3c0c631c97a0a62e8e68a6be66fbafe/impl/src/main/java/com/sun/faces/renderkit/html_basic/MenuRenderer.java#L872
2) UIInput#validate- submittedValue is not not null, so it continues with
validation. The if checks for ((String) submittedValue).length() == 0 and sets
the submitted value back to null -
https://github.com/eclipse-ee4j/mojarra/blob/be054fde83df012a6add3b406eec44aa28975a28/impl/src/main/java/jakarta/faces/component/UIInput.java#L806-L811
3) MenuRenderer#convertSelectOneValue - during validate() a
getConvertedValue call occurs, which leads to
MenuRenderer#convertSelectOneValue. In this method, there's a isNoValueOrNull
call which sees that the submitted value is null and logs ""No conversion
necessary for SelectOne Component since the new value is null"
These changes followed a similar pattern. Although, I believe parts of
this could be a potential challenge, such as the null check in the conversion
call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]