@Override public void iterationRemoved() { // Inform descendants super.iterationRemoved(); // Destroy container and models if any nestedContainer.destroy(); }
@Override public void childrenAdded() { super.childrenAdded(); // It doesn't seem to make much sense to dispatch xforms-ready to nested models. If we still did // want to do // that, we should do it once ALL controls have been initialized. But likely this is not a good // idea // either. }
@Override // TODO: we should not override this, but currently due to the way XFormsContextStack works with // XBL, even non-relevant // XFormsComponentControl expect the binding to be set. public void setBindingContext(XFormsContextStack.BindingContext bindingContext) { super.setBindingContext(bindingContext); nestedContainer.setBindingContext(bindingContext); nestedContainer.getContextStack().resetBindingContext(); }
@Override public void updateEffectiveId() { // This is called iif the iteration index changes // Update rest of control tree super.updateEffectiveId(); // Update container with new effective id nestedContainer.updateEffectiveId(getEffectiveId()); }
@Override protected void onBindingUpdate( XFormsContextStack.BindingContext oldBinding, XFormsContextStack.BindingContext newBinding) { super.onBindingUpdate(oldBinding, newBinding); final boolean isNodesetChange = !compareNodesets(oldBinding.getNodeset(), newBinding.getNodeset()); if (isNodesetChange) { // Control's binding changed // NOP for now } }
@Override protected void onCreate() { super.onCreate(); // Control is newly created if (containingDocument.isRestoringDynamicState()) { // Restore models nestedContainer.restoreModelsState(); } else { // Start models initialization nestedContainer.initializeModels( new String[] { XFormsEvents.XFORMS_MODEL_CONSTRUCT, XFormsEvents.XFORMS_MODEL_CONSTRUCT_DONE }); } nestedContainer.getContextStack().resetBindingContext(); }