volosied commented on code in PR #492:
URL: https://github.com/apache/myfaces/pull/492#discussion_r1082910214


##########
impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java:
##########
@@ -292,6 +292,12 @@ public static void decodeUISelectOne(FacesContext 
facesContext, UIComponent comp
                                 callback);
                     }
                 }
+                else 
+                {
+                    // means input was not submitted. set to empty string so 
we can validate required fields
+                    // if not set, a null value will skip validation -- see 
beginning of UIInput#validate
+                    
((EditableValueHolder)component).setSubmittedValue(RendererUtils.EMPTY_STRING);

Review Comment:
   Setting to RendererUtils.EMPTY_STRING, similar as to Line 322 & 245
   
   Not a fan of using an empty string here ( since it's later converted to a 
null), maybe an enum would be better...? 



-- 
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]

Reply via email to