private void initListeners(final UnitVmModel model) { model .getAdvancedMode() .getPropertyChangedEvent() .addListener( new IEventListener<EventArgs>() { @Override public void eventRaised( Event<? extends EventArgs> ev, Object sender, EventArgs args) { storeAdvancedModeToLocalStorage(model); swithAccordingToMode(model); } }); model .getAttachedToInstanceType() .getPropertyChangedEvent() .addListener( new IEventListener<EventArgs>() { @Override public void eventRaised( Event<? extends EventArgs> ev, Object sender, EventArgs args) { swithAttachToInstanceType(model); } }); model .getValid() .getPropertyChangedEvent() .addListener( new IEventListener<EventArgs>() { @Override public void eventRaised( Event<? extends EventArgs> ev, Object sender, EventArgs args) { switchToAdvancedIfNeeded(model); } }); registerHandler( getView() .getNumaSupportButton() .addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { getView().getNumaSupportButton().getCommand().execute(); } })); }
private void swithAttachToInstanceType(final UnitVmModel model) { getView().switchAttachToInstanceType(model.getAttachedToInstanceType().getEntity()); }