@Test public void testProcessFieldChange() { testHandlerModelSetup(); final String address = "Springsfield"; formHandler.processFieldChange(addressField, address); verify(fieldChangeHandlerManager).processFieldChange(eq(USER_ADDRESS_FIELD_NAME), eq(address), any()); verify(fieldChangeHandlerManager, never()).notifyFieldChange(eq(USER_ADDRESS_FIELD_NAME), eq(address)); verify(userAddress).onFieldChange(eq(USER_ADDRESS_FIELD_NAME), eq(address)); }
protected void processFieldChange(FormField formField, Object newValue) { if (enabledOnChangeValidations) { fieldChangeManager.processFieldChange(formField.getFieldName(), newValue, getModel()); } else { notifyFieldChange(formField.getFieldName(), newValue); } }
FormHandlerImpl implements FormHandler<T> { protected void processFieldChange(FormField formField, Object newValue) { if (enabledOnChangeValidations) { fieldChangeManager.processFieldChange(formField.getFieldName(), newValue, getModel()); } else { notifyFieldChange(formField.getFieldName(), newValue); } } }
FormHandlerImpl implements FormHandler<T> { protected void processFieldChange(FormField formField, Object newValue) { if (enabledOnChangeValidations) { fieldChangeManager.processFieldChange(formField.getFieldName(), newValue, getModel()); } else { notifyFieldChange(formField.getFieldName(), newValue); } } @Inject  FormHandlerImpl(FormValidator validator,
                           FieldChangeHandlerManager fieldChangeManager); }
FormHandlerImpl implements FormHandler<T> { protected void processFieldChange(FormField formField, Object newValue) { if (enabledOnChangeValidations) { fieldChangeManager.processFieldChange(formField.getFieldName(), newValue, getModel()); } else { notifyFieldChange(formField.getFieldName(), newValue); } } @Inject  FormHandlerImpl(FormValidator validator,
                           FieldChangeHandlerManager fieldChangeManager); @Override void setUp(T model); @Override void registerInput(FormField formField); @Override void registerInput(FormField formField,
                              Converter valueConverter); void addFieldChangeHandler(FieldChangeHandler handler); void addFieldChangeHandler(String fieldName,
                                      FieldChangeHandler handler); @Override boolean validate(); @Override boolean validate(String propertyName); @Override void setReadOnly(boolean readOnly); @Override Form getForm(); @Override void clear(); @Override void maybeFlush(); T getModel(); }
FormHandlerImpl implements FormHandler<T> { protected void processFieldChange(FormField formField, Object newValue) { if (enabledOnChangeValidations) { fieldChangeManager.processFieldChange(formField.getFieldName(), newValue, getModel()); } else { notifyFieldChange(formField.getFieldName(), newValue); } } @Inject  FormHandlerImpl(FormValidator validator,
                           FieldChangeHandlerManager fieldChangeManager); @Override void setUp(T model); @Override void registerInput(FormField formField); @Override void registerInput(FormField formField,
                              Converter valueConverter); void addFieldChangeHandler(FieldChangeHandler handler); void addFieldChangeHandler(String fieldName,
                                      FieldChangeHandler handler); @Override boolean validate(); @Override boolean validate(String propertyName); @Override void setReadOnly(boolean readOnly); @Override Form getForm(); @Override void clear(); @Override void maybeFlush(); T getModel();  }