mardi 8 octobre 2019

Vaadin 7 -> com.vaadin.ui.CheckBox -> ".getValue()" does always return "false"

I use a Vaadin7 com.vaadin.ui.CheckBox with Java 1.8 on a Wildfly Application Server.

I have a PopUpDialog with the following checkbox configuration:

checkBox1.addValueChangeListener(event -> // Java 8
                LOGGER.info("property Value: "+ event.getProperty().getValue().toString()+
                        " getValue Value: "+checkBox1.getValue()));

When I click the checkBox1 in the User Interface in the WebBrowser the ValueChangeListener gets called.

The first property Value "event.getProperty().getValue().toString()" returns the correct true/false state of the checkbox.

But the checkBox1.getValue() which I want to use in my PopUpDialog class methods to access the true/false == clicked/not clicked state of the checkobox returns always false even if I call it in the ValueChangeListener

Can someone help me why the "getValue()" method does not return the correct state ?




Aucun commentaire:

Enregistrer un commentaire