Skip to content
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

Add methods to control validation #8094

Merged
merged 5 commits into from
May 6, 2020
Merged

Add methods to control validation #8094

merged 5 commits into from
May 6, 2020

Conversation

TatuLund
Copy link
Contributor

@TatuLund TatuLund commented Apr 17, 2020

  • Enable / disable all validators on Binder level
  • Enable / disable validators on Binding level
  • add writeBeanAsDraft(bean,boolean) for writing draft bean with validators disabled

Fixes: #5030


This change is Reviewable

- Enable / disable all validators on Binder level
- Enable / disable validators on Binding level
- add writeBeanAsDraft(bean,boolean) for writing draft bean with validators disabled

Fixes: #5030
@@ -849,6 +866,7 @@ protected BindingBuilderImpl(Binder<BEAN> binder,
Binding binding = ((BindingBuilder) finalBinding).bind(getter,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Rename "binding" which hides the field declared at line 772. rule

*
* @param validatorsDisabled A boolean value
*/
public void setValidatorsDisabled(boolean validatorsDisabled);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR "public" is redundant in this context. rule

*
* @return A boolean value
*/
public boolean isValidatorsDisabled();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR "public" is redundant in this context. rule

@vaadin-bot
Copy link
Collaborator

SonarQube analysis reported 4 issues

  • MAJOR 2 major
  • MINOR 2 minor

Watch the comments in this conversation to review them.

1 extra issue

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR Binder.java#L818: Rename "binding" which hides the field declared at line 772. rule

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 2 files at r1, 1 of 1 files at r4.
Reviewable status: 3 unresolved discussions, 0 of 1 LGTMs obtained (waiting on @TatuLund)


flow-data/src/main/java/com/vaadin/flow/data/binder/Binder.java, line 1892 at r4 (raw file):

disable all Validators during write

disable validators during write if true would be clearer as the current param description doesn't indicate value expectations.

Copy link
Contributor

@caalador caalador left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Dismissed @vaadin-bot from 3 discussions.
Reviewable status: :shipit: complete! all discussions resolved, 1 of 1 LGTMs obtained

@caalador caalador merged commit 9f52bd8 into master May 6, 2020
@caalador caalador deleted the fix5030 branch May 6, 2020 03:44
@pleku pleku mentioned this pull request May 6, 2020
denis-anisimov pushed a commit that referenced this pull request May 8, 2020
- Enable / disable all validators on Binder level
- Enable / disable validators on Binding level
- add writeBeanAsDraft(bean,boolean) for writing draft bean with validators disabled

Fixes #5030
pleku pushed a commit that referenced this pull request May 11, 2020
- Enable / disable all validators on Binder level
- Enable / disable validators on Binding level
- add writeBeanAsDraft(bean,boolean) for writing draft bean with validators disabled

Fixes #5030
@mshabarov mshabarov added this to the 2.3.0.alpha1 milestone May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add methods to modify an existing binding
4 participants