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