-
Notifications
You must be signed in to change notification settings - Fork 168
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
Binder-bound checkboxes getting reset #4304
Comments
It looks like this is known issue with the client-side property which sets its default value from the client side if the server side is not set. |
Any thoughts on work around for this? I tried a few things include doing a delayed load of the bean, but not of the work arounds worked. |
I'm pretty sure that this bug has no relation to Binder. What's important in this description is: the You asked about workaround: the workaround is avoid using So the problem is I recall similar issue even without |
That will be a lot of fun to debug this issue........ So here is the short localized version of this bug.
The checkbox should be checked as its value is set initially to In fact if one comment out the |
I have a number of forms using polymer templates and on all the forms, the checkboxes are getting reset when the form is displayed. Using a ValueChangeListener, I found that the checkbox is being set twice. The first time it is being set when I call readBean or setBean (correct). But it's being set a second time (reset) after the attach event. The fromClient flag is true when it's being reset, suggesting it comes from the client.
To better trace through the issue, I created a simple form with a checkbox, a text field and two buttons. When loaded within my app, the checkbox is being reset even though it shouldn't be. However, if I outcomment the second button in the java code, the check box is not reset and shows as checked when the forms open.
At one point in time, I was able to get it to work by shorting the package name. But it was inconsistent.
Other bound components seems to be working just fine. It's only the checkboxes that aren't. The behaviour has been consistent through the last couple of betas and all RCs including RC5.
The behavior can be observed in a vanilla bakery-app, by adding the attached files under ../ui/views/development/. Note - use the same path/package location. When I initially tried with the files located higher in the hierarchy, the issue didn't occur or didn't occur consistently.
checkboxes.zip
The text was updated successfully, but these errors were encountered: