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


##########
api/src/main/java/jakarta/faces/component/UISelectOne.java:
##########
@@ -69,19 +69,20 @@ public String getFamily()
     }
 
     /**
-     * Verify that when ever there is a ValueExpression and submitted value is 
not empty, then
+     * Check whether a group exists and then
      * visit all the UISelectItem elements within the UISelectOne radio 
components to check if
-     * the submitted value exists in any of the select items.
+     * the submitted value is empty (ie. not submitted) or if a previous group 
item has been
+     * has failed to be validated (if no so further validation processing is 
needed)
      *
      * @see 
jakarta.faces.component.UIInput#processValidators(jakarta.faces.context.FacesContext)
      */
     @Override
     public void processValidators(FacesContext context) 
     {
         String group = getGroup();
-        ValueExpression ve = getValueExpression("value");
         String submittedValue = (String) getSubmittedValue();
-        if (group != null && !group.isEmpty() && ve != null && 
!isEmpty(submittedValue)) 
+
+        if (group != null && !group.isEmpty()) 

Review Comment:
   Relevant spec: 
https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/uiselectone#processValidators(jakarta.faces.context.FacesContext)
   
   If 
[getGroup()](https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/uiselectone#getGroup())
 is set, and 
[UIInput.getSubmittedValue()](https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/UIInput.html#getSubmittedValue())
 is empty, and at least one other component having the same group within a 
UIForm parent has a non-empty 
[UIInput.getSubmittedValue()](https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/UIInput.html#getSubmittedValue())
 or returns true on 
[UIInput.isLocalValueSet()](https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/UIInput.html#isLocalValueSet())
 or returns false on 
[UIInput.isValid()](https://jakarta.ee/specifications/faces/4.0/apidocs/jakarta/faces/component/UIInput.html#isValid()),
 then skip validation for current component, else perform standard superclass 
processing by super.processValidators(context).
   



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