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

Checkbox to boolean binding no longer seems to work in rc5 #212

Closed
davidmacsix opened this issue Jun 21, 2018 · 2 comments
Closed

Checkbox to boolean binding no longer seems to work in rc5 #212

davidmacsix opened this issue Jun 21, 2018 · 2 comments

Comments

@davidmacsix
Copy link

In our in-house project, binding of a Checkbox to a boolean bean property no longer seems to work.

I have an old copy of the bakery starter project based on 10.0.0.beta3.

I added a boolean field called archived to the User entity:

  public boolean isArchived() { 
    return archived; 
  } 
 
  public void setArchived(boolean archived) { 
    this.archived = archived; 
  } 
 
  private boolean archived; 

I added a checkbox to user-form.html:

  <vaadin-checkbox id="archived">Archived</vaadin-checkbox> 

Then in UserForm.java I added the checkbox and a binding:

  @Id("archived")
  private Checkbox archived; 

and in setBinder() I added a new binding for the new field:

binder.bind(archived, "archived");

This works as expected and I can edit a user and set and Unser the archived property.
See below:
binder_working_beta2

Now, if I do the same with the latest starter, based on rc5, you'll notice that the archived checkbox is not being set when the dialog is re-opened:
binding_not_working_rc5

I've attached the projects referenced above:
vaadin-bakery-app_beta3_working.zip

my-starter-project_rc5_not_working.zip

Thanks.

David.

@pleku
Copy link
Contributor

pleku commented Jun 26, 2018

Issue moved to vaadin/vaadin-checkbox-flow #60 via ZenHub

@pleku
Copy link
Contributor

pleku commented Jun 26, 2018

Thanks for the report, I've moved the issue to the Java integration repository of the web component. You can follow it from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants