/** * Synchronize between the current value to model */ @Override public void commitModification() { if (owner != null) { owner.commitModification(); } }
/** * * @see com.nexitia.emaginplatform.jfx.core.engine.components.form.row.InputComponentWrapper#commitModification() */ public void commitModification() { owner.commitModification(); }
public default void commitModification() { if (getInputComponentWrapper() != null) { getInputComponentWrapper().commitModification(); } }
/** * validate entries * * @return */ @Override public void validate() { // commit the form before validating for(IInputComponentWrapper editInput: rows) { editInput.commitModification(); } //logR.debug("End Commit values from form to backing bean"); //logR.debug("Backing bean to string : "); if (controller.getModel() != null) { //logR.debug(controller.getModel().toString()); } // validate each row for(IInputComponentWrapper row: rows) { row.validate(); } isValid = true; for (IInputComponentWrapper row : rows) { if (row.isNotValid()) { isValid = false; break; } } //logR.debug("Form is valid : " + isValid); }
} else { for(IInputComponentWrapper r: row.getEntries()) { r.commitModification();
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); final String desc = configuration.getPropertyValue("description"); if (StringUtils.isNotBlank(desc)) { checkBox.setText(controller.getLocalised(desc)); } checkBox.selectedProperty().addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> { owner.setCurrentValue(newValue); owner.commitModification(); }); layout.getChildren().addAll(NodeHelper.horizontalSpacer(), checkBox); checkBox.selectedProperty().set(Boolean.valueOf(owner.getCurrentInternalValue())); }
public void onCommitSuccess(IOperationResult result) { // commit all modifications for(IInputComponentWrapper r: row.getEntries()) { r.commitModification(); } row.endInlineEdit(); NotificationsUtils.sendObjectUpdateSuccessNotif(controller); // update version Integer newVersion = (Integer) ReflectionUIUtils.invokeGetterOn(result, "data.attributes.version"); ReflectionUIUtils.invokeSetterOn(row.getController().getModel(), "data.attributes.version", newVersion); // inform other object that this object have been updated ModelUpdatedEvent event = new ModelUpdatedEvent.Builder().model(result).build(); controller.dispatchEvent(event); } }
@Override public void onCommitSuccess(IOperationResult result) { // commit all modifications for(IInputComponentWrapper entry: row.getEntries()) { entry.commitModification(); } row.endInlineEdit(); NotificationsUtils.sendObjectUpdateSuccessNotif(controller); // update version Integer newVersion = (Integer) ReflectionUIUtils.invokeGetterOn(result, "data.attributes.version"); ReflectionUIUtils.invokeSetterOn(row.getController().getModel(), "data.attributes.version", newVersion); // inform other object that this object have been updated ModelUpdatedEvent event = new ModelUpdatedEvent.Builder().model(result).build(); controller.dispatchEvent(event); } }
selected.addListener((ChangeListener<Boolean>) (observable, oldValue, newValue) -> { inputComponentWrapper.setCurrentValue(newValue); inputComponentWrapper.commitModification(); });