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


##########
api/src/main/java/jakarta/faces/component/UISelectOne.java:
##########
@@ -90,37 +91,43 @@ public void processValidators(FacesContext context)
                 @Override
                 public VisitResult visit(VisitContext visitContext, 
UIComponent target) 
                 {
+                    // check they they are of the same group
                     if (target instanceof UISelectOne  && ((UISelectOne) 
target).getGroup().equals(group)) 
                     {
-                        UISelectOne radio = (UISelectOne) target;
-
-                        // if target is an instance of UISelectOne then get 
all the UISelectItem children
-                        // and verify if the submitted value exists
-                        for (Iterator<UIComponent> iter = 
radio.getChildren().iterator(); iter.hasNext(); ) 
-                        {
-                            UIComponent component = iter.next();
-                            if (component instanceof UISelectItem) 
-                            {
-                                UISelectItem item = (UISelectItem) component;
-                                if 
(item.getItemValue().equals(submittedValue)) 
-                                {
-                                    selectItemValueFound = true;
-                                    return VisitResult.COMPLETE;
-                                }
-                            }
-
-                        }
-                        return VisitResult.REJECT;

Review Comment:
   @volosied this code checked if the submittedValue is valid and present as 
SelectItem - do we still have such a check now after removing this?



-- 
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: dev-unsubscr...@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to