Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Button & setPropertyDataSource
Hi guys.
Is there an approach to handle the readonly button state via Property as it was in Vaadin 6 like
ObjectProperty<Boolean> somePropety = new Objectproperty<>(Boolean.FALSE);
btn.setPropertyDataSource(someProperty);
// after you can just call
someProperty.setReadonly(tru);
// and voila! we have the readonly-state button
if not, what's the best way to do such stuff? or correct me, if I understood smth wrong.
Last updated on
Something like this (Java 8 code below):
ObjectProperty<Boolean> somePropety = new Objectproperty<>(Boolean.FALSE);
someProperty.addValueChangeListener(e -> btn.setReadOnly(e.getValue()));
// after you can just call
someProperty.setReadonly(tru);
Last updated on
Hi Michael. Thanks for your reply. Yeah, I already did the same thing you've written above, just don't have time to post reply here
Best rgrds.
Jenia
Last updated on
You cannot reply to this thread.