@Override public void discard() throws SourceException { super.discard(); for (Field<?> eachField : fields.values()) { eachField.discard(); } }
public FieldQuery<F> discard() { for (Field<?> f : this) { // TODO transactionality f.discard(); } return createQuery(); }
private void enableField(Field<?> field, boolean enabled) { field.setEnabled(enabled); // we revert changes, when we disable the fields if (!enabled) { field.discard(); // hide validation errors when disabled if (field instanceof AbstractComponent) { ((AbstractComponent) field).setComponentError(null); } } }