/** * 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)); }
public void unbind() { if (bound) { bound = false; unbindModels(); onUnbind(); dirty.setDelegate(provider.dirty()); handlerRegistry.dispose(); binder.dispose(); validationBinder.dispose(); validationTree.dispose(); } }