Esempio n. 1
0
 @Override
 public void discard() throws SourceException {
   super.discard();
   for (Field<?> eachField : fields.values()) {
     eachField.discard();
   }
 }
Esempio n. 2
0
 public FieldQuery<F> discard() {
   for (Field<?> f : this) {
     // TODO transactionality
     f.discard();
   }
   return createQuery();
 }
Esempio n. 3
0
 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);
     }
   }
 }