Switch add-on with push, vaadin

I have a simple example of the add-on switch with vaadin, what I want is to keep the state of the switch even when I update the UI, that is, I support multiple tabs, but I can not do it, this push example is very similar to What I want to do but with a textField.


https://github.com/vaadin-marcus/push-example/blob/master/src/main/java/com/vaadin/training/ScrumBoardLayout.java


https://github.com/rucko24/MVP/blob/testingSwitchPushTemu/src/main/java/com/Core/vaadin/pushServer/ejemploPushMarkus/ScrumBoard.java

To my example I add a bulb so that when another accesses the application can see the current state of the bulb. My example in github is this with only 3 classes


https://github.com/rucko24/MVP/tree/testingSwitchPushTemu/src/main/java/com/Core/vaadin/pushServer/ejemploPushMarkus

This is the swithc listener that changes my bulb, but when I get the boolean value (true, or false), I still do not understand the right way to push the other switch

switchTemu.addValueChangeListener(new Property.ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(Property.ValueChangeEvent event) { boolean estado = (boolean) event.getProperty().getValue(); ScrumBoard.addSwitch(estado); switchTemu.removeValueChangeListener(this); if(estado == Boolean.TRUE) { bombilla.setIcon(bombillaON); } else { bombilla.setIcon(bombillaOFF); } switchTemu.addValueChangeListener(this); } }); In my example github achievement, change the state of all switches to all UI, but I still do not know how to get the state of the switches


https://stackoverflow.com/questions/44358832/switch-add-on-with-push-vaadin