Exemplo n.º 1
0
  /**
   * Make this {@link AbstractModel}'s dirty value depend on the inner {@link AbstractModel}-s, if
   * there are any.
   */
  private void updateDirtyDelegate() {
    List<ValueModel<Boolean>> values = new ArrayList<ValueModel<Boolean>>();
    values.add(provider.dirty());

    for (AbstractModel<?> model : models) {
      values.add(model.dirty());
    }

    dirty.setDelegate(new ReducingCondition(new OrFunction(), values));
  }