@Override public void apply() { controller.getView().setEnabled(true); controller.getView().getToolbarView().setDisplayMode(ViewMode.EDIT); getViewModel().getCurrentRealizer().saveToMemento(); }
@Override public ControllerState save(FormBean bean) { IPersonFormBean infos = (IPersonFormBean) bean; String oldTitle = getViewModel().getCurrentRealizer().getDisplayableText(); Person realizer = getViewModel().getCurrentRealizer(); infos.fillPerson(realizer); realizersService.save(getViewModel().getCurrentRealizer()); if (!oldTitle.equals(getViewModel().getCurrentRealizer().getDisplayableText())) { controller.getView().resort(); controller.getView().select(getViewModel().getCurrentRealizer()); } return controller.getViewState(); }