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

fix: fix setReadonly when using binder with records #20855

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

mcollovati
Copy link
Collaborator

Description

When Binder is used with record, calling setReadonly method does not have any effect because the logic only considers bindings with a proper setter. This change fixes the setReadonly logic to take care of all bindings when Binder is using a record.

Fixes #20854

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

When Binder is used with record, calling setReadonly method does not have
any effect because the logic only considers bindings with a proper setter.
This change fixes the setReadonly logic to take care of all bindings when
Binder is using a record.

Fixes #20854
Copy link

Test Results

1 163 files  ± 0  1 163 suites  ±0   1h 26m 17s ⏱️ - 6m 52s
7 621 tests + 1  7 565 ✅ + 1  56 💤 ±0  0 ❌ ±0 
7 948 runs   - 43  7 883 ✅  - 43  65 💤 ±0  0 ❌ ±0 

Results for commit 819b825. ± Comparison against base commit 049bfdf.

@mshabarov mshabarov merged commit 1a5cf24 into main Jan 16, 2025
26 checks passed
@mshabarov mshabarov deleted the issues/20854-binder_record_set_readonly branch January 16, 2025 10:54
vaadin-bot pushed a commit that referenced this pull request Jan 16, 2025
When Binder is used with record, calling setReadonly method does not have
any effect because the logic only considers bindings with a proper setter.
This change fixes the setReadonly logic to take care of all bindings when
Binder is using a record.

Fixes #20854
vaadin-bot pushed a commit that referenced this pull request Jan 16, 2025
When Binder is used with record, calling setReadonly method does not have
any effect because the logic only considers bindings with a proper setter.
This change fixes the setReadonly logic to take care of all bindings when
Binder is using a record.

Fixes #20854
vaadin-bot added a commit that referenced this pull request Jan 16, 2025
When Binder is used with record, calling setReadonly method does not have
any effect because the logic only considers bindings with a proper setter.
This change fixes the setReadonly logic to take care of all bindings when
Binder is using a record.

Fixes #20854

Co-authored-by: Marco Collovati <[email protected]>
vaadin-bot added a commit that referenced this pull request Jan 16, 2025
When Binder is used with record, calling setReadonly method does not have
any effect because the logic only considers bindings with a proper setter.
This change fixes the setReadonly logic to take care of all bindings when
Binder is using a record.

Fixes #20854

Co-authored-by: Marco Collovati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Binder ignores setReadonly for Java Records
3 participants