volosied commented on code in PR #513:
URL: https://github.com/apache/myfaces/pull/513#discussion_r1100940344
##########
api/src/main/java/jakarta/faces/component/UISelectOne.java:
##########
@@ -95,23 +95,24 @@ public VisitResult visit(VisitContext visitContext,
UIComponent target)
{
// check if the is empty (see ) or if it's not valid
(means this path has been taken already)
// See conditions listed under spec:
uiselectone#processValidators
- if(isEmpty(submittedValue) &&
isSubmittedAlready(target)){
+ if(isSubmittedAlready(target)){
previouslySubmittedOrValidated = true;
return VisitResult.COMPLETE;
}
}
return VisitResult.ACCEPT;
}
});
- }
- if(previouslySubmittedOrValidated){
- // Skip further validation due to either
- // 1) one of the submissions are not valid (for instance,
required, but none submitted (see jakarta/faces#329))
- // 2) submitted value has been found and validated
- return;
+ if(previouslySubmittedOrValidated){
+ // Skip further validation due to either
+ // 1) one of the submissions are not valid (for instance,
required, but none submitted (see jakarta/faces#329))
+ // 2) submitted value has been found and validated
+ return;
+ }
Review Comment:
Did some refactoring here as we should really only return when
`isEmpty(submittedValue)` is true since we're just trying to skip further
validation.
--
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]