-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation fixes #18535
Merged
Merged
Validation fixes #18535
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tepi
force-pushed
the
validation-changes
branch
from
January 25, 2024 09:38
693cbbf
to
d73317c
Compare
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
mcollovati
approved these changes
Jan 26, 2024
vaadin-bot
pushed a commit
that referenced
this pull request
Jan 26, 2024
Changes: - Once Binder.handleFieldValueChange runs for a binding when readBean was used, the whole binder will be silently validated also. BinderValidationStatusHandler is called like before (only contains status from changed binding), but StatusChangeEvent is now fired considering all bindings and if possible bean validators as well. - Once Binder.handleFieldValueChange runs for a binding when setBean was used, doWriteIfValid will validate all bindings, not only the changed ones. This prevents writing an invalid bean in cases where one or more of the initial values are in invalid state (but not marked as such since setBean resets validation status), but they have not been changed from their initial value(s). Calling setAsRequiredEnabled with a changed value no longer triggers validation, since that validation is now handled elsewhere when needed as stated above. Minor Javadoc fixes, trying to align Javadocs with code. Fixes #18163 Fixes #4988 Fixes #17515
vaadin-bot
pushed a commit
that referenced
this pull request
Jan 26, 2024
Changes: - Once Binder.handleFieldValueChange runs for a binding when readBean was used, the whole binder will be silently validated also. BinderValidationStatusHandler is called like before (only contains status from changed binding), but StatusChangeEvent is now fired considering all bindings and if possible bean validators as well. - Once Binder.handleFieldValueChange runs for a binding when setBean was used, doWriteIfValid will validate all bindings, not only the changed ones. This prevents writing an invalid bean in cases where one or more of the initial values are in invalid state (but not marked as such since setBean resets validation status), but they have not been changed from their initial value(s). Calling setAsRequiredEnabled with a changed value no longer triggers validation, since that validation is now handled elsewhere when needed as stated above. Minor Javadoc fixes, trying to align Javadocs with code. Fixes #18163 Fixes #4988 Fixes #17515
vaadin-bot
added a commit
that referenced
this pull request
Jan 26, 2024
Changes: - Once Binder.handleFieldValueChange runs for a binding when readBean was used, the whole binder will be silently validated also. BinderValidationStatusHandler is called like before (only contains status from changed binding), but StatusChangeEvent is now fired considering all bindings and if possible bean validators as well. - Once Binder.handleFieldValueChange runs for a binding when setBean was used, doWriteIfValid will validate all bindings, not only the changed ones. This prevents writing an invalid bean in cases where one or more of the initial values are in invalid state (but not marked as such since setBean resets validation status), but they have not been changed from their initial value(s). Calling setAsRequiredEnabled with a changed value no longer triggers validation, since that validation is now handled elsewhere when needed as stated above. Minor Javadoc fixes, trying to align Javadocs with code. Fixes #18163 Fixes #4988 Fixes #17515 Co-authored-by: Teppo Kurki <[email protected]>
vaadin-bot
added a commit
that referenced
this pull request
Jan 26, 2024
Changes: - Once Binder.handleFieldValueChange runs for a binding when readBean was used, the whole binder will be silently validated also. BinderValidationStatusHandler is called like before (only contains status from changed binding), but StatusChangeEvent is now fired considering all bindings and if possible bean validators as well. - Once Binder.handleFieldValueChange runs for a binding when setBean was used, doWriteIfValid will validate all bindings, not only the changed ones. This prevents writing an invalid bean in cases where one or more of the initial values are in invalid state (but not marked as such since setBean resets validation status), but they have not been changed from their initial value(s). Calling setAsRequiredEnabled with a changed value no longer triggers validation, since that validation is now handled elsewhere when needed as stated above. Minor Javadoc fixes, trying to align Javadocs with code. Fixes #18163 Fixes #4988 Fixes #17515 Co-authored-by: Teppo Kurki <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes:
Binder.handleFieldValueChange
runs for a binding whenreadBean
was used, the whole binder will be silently validated also.BinderValidationStatusHandler
is called like before (only contains status from changed binding), butStatusChangeEvent
is now fired considering all bindings and if possible bean validators as well.Binder.handleFieldValueChange
runs for a binding whensetBean
was used,doWriteIfValid
will validate all bindings, not only the changed ones. This prevents writing an invalid bean in cases where one or more of the initial values are in invalid state (but not marked as such sincesetBean
resets validation status), but they have not been changed from their initial value(s).setAsRequiredEnabled
with a changed value no longer triggers validation, since that validation is now handled elsewhere when needed as stated above.Fixes #18163
Fixes #4988
Fixes #17515
Probably fixes some other binder / validation issues as well.