Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
nsXFormsControlStubBase Class Reference

Common stub for all XForms controls that inherit from nsIXFormsControl and is bound to an instance node. More...

#include <nsXFormsControlStub.h>

Inheritance diagram for nsXFormsControlStubBase:
Inheritance graph
[legend]
Collaboration diagram for nsXFormsControlStubBase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_IMETHOD GetBoundNode (nsIDOMNode **aBoundNode)
NS_IMETHOD BindToModel (PRBool aSetBoundNode=PR_FALSE)
NS_IMETHOD GetDependencies (nsCOMArray< nsIDOMNode > **aDependencies)
NS_IMETHOD GetElement (nsIDOMElement **aElement)
NS_IMETHOD ResetBoundNode (const nsString &aBindAttribute, PRUint16 aResultType, PRBool *aContextChanged)
NS_IMETHOD Bind (PRBool *aContextChanged)
NS_IMETHOD Refresh ()
NS_IMETHOD GetOnDeferredBindList (PRBool *onList)
NS_IMETHOD SetOnDeferredBindList (PRBool putOnList)
NS_IMETHOD TryFocus (PRBool *aOK)
NS_IMETHOD IsEventTarget (PRBool *aOK)
NS_IMETHOD GetUsesModelBinding (PRBool *aRes)
NS_IMETHOD GetUsesSingleNodeBinding (PRBool *aRes)
NS_IMETHOD GetDefaultIntrinsicState (PRInt32 *aRes)
NS_IMETHOD GetDisabledIntrinsicState (PRInt32 *aRes)
NS_IMETHOD RebindAndRefresh ()
NS_IMETHOD GetAbortedBindListContainer (nsIXFormsContextControl **aContainer)
NS_IMETHOD SetAbortedBindListContainer (nsIXFormsContextControl *aContainer)
nsresult Create (nsIXTFElementWrapper *aWrapper)
nsresult HandleDefault (nsIDOMEvent *aEvent, PRBool *aHandled)
nsresult OnDestroyed ()
nsresult WillChangeDocument (nsIDOMDocument *aNewDocument)
nsresult DocumentChanged (nsIDOMDocument *aNewDocument)
nsresult WillChangeParent (nsIDOMElement *aNewParent)
nsresult ParentChanged (nsIDOMElement *aNewParent)
nsresult WillSetAttribute (nsIAtom *aName, const nsAString &aValue)
nsresult AttributeSet (nsIAtom *aName, const nsAString &aValue)
nsresult WillRemoveAttribute (nsIAtom *aName)
nsresult AttributeRemoved (nsIAtom *aName)
void AddRemoveSNBAttr (nsIAtom *aName, const nsAString &aValue)
 This function manages the mBindAttrsCount value.
virtual PRBool IsContentAllowed ()
 This function is overridden by controls that are restricted in the type of content that may be bound to the control.
virtual PRBool IsContentComplex ()
 This function determines if the content to which the control is being bound is complex; ie contains Element children.
virtual nsRepeatState GetRepeatState ()
 Get/Set the repeat state for the control.
virtual void SetRepeatState (nsRepeatState aState)
NS_DECL_NSIXFORMSCONTEXTCONTROL nsXFormsControlStubBase ()
 Constructor.
boolean tryFocus ()
 Tries to move focus to form control and returns true if succeeded.
void bindToModel (in boolean setBoundNode)
 Binds the control to the model.
boolean isEventTarget ()
 According to sec 4.1 in the spec, only certain controls are allowed to be targets of the interaction and notification events.
void rebindAndRefresh ()
 This method is used to force the control to recalculate its bound node and to refresh.
void getContext (out AString aModelID, out nsIDOMNode aContextNode, out long aContextPosition, out long aContextSize)
 Used by children to retrieve the context of their parent.
void setContext (in nsIDOMNode aContextNode, in long aContextPosition, in long aContextSize)
 Used by parents to set the context for children.
void addRemoveAbortedControl (in nsIXFormsControl aControl, in boolean aAddControl)
 Each context control maintains an 'aborted bind' list.
boolean bind ()
 This tells the form control to update its node binding based on the current instance data.
void refresh ()
 This tells the form control to update its state based on the current instance data.

Public Attributes

const PRUint32 kStandardNotificationMask
 The standard notification flags set on nsIXTFElement.
const PRUint32 kElementFlags
 The element flags for the controls passed to nsXFormsUtils:EvaluateNodeBinding()
readonly attribute nsIDOMNode boundNode
 The instance node that the control is bound to.
readonly attribute nsCOMArrayPtr dependencies
 The instance nodes that the control depend on.
readonly attribute nsIDOMElement element
 Get the element that should receive events for the control.
readonly attribute boolean usesModelBinding
 Is true when the control is getting its instance data node binding from a model bind element, ie.
readonly attribute boolean usesSingleNodeBinding
 Is true when the control uses single node binding.
readonly attribute long defaultIntrinsicState
 These represent the default intrinsic states for controls when they are enabled and disabled.
readonly attribute long disabledIntrinsicState
attribute nsIXFormsContextControl abortedBindListContainer
 The keeper of the aborted bind list, if any, that this control is currently listed on.
attribute boolean onDeferredBindList
 Determines whether this control is already on the deferred bind list.

Protected Member Functions

PRBool HasBindingAttribute () const
 Does control have a binding attribute?
PRBool GetRelevantState ()
 Returns the relevant state of the control.
nsresult ProcessNodeBinding (const nsString &aBindingAttr, PRUint16 aResultType, nsIDOMXPathResult **aResult, nsIModelElementPrivate **aModel=nsnull)
 Processes the node binding of a control, get the current Model (mModel) and binds the control to it.
void ResetHelpAndHint (PRBool aInitialize)
 Reset (and reinitialize) the event listener, which is used to create xforms-hint and xforms-help events.
virtual PRBool IsBindingAttribute (const nsIAtom *aAttr) const
 Checks whether an attribute is a binding attribute for the control.
virtual void AfterSetAttribute (nsIAtom *aName)
 Causes Bind() and Refresh() to be called if aName is the atom of a single node binding attribute for this control.
void BeforeSetAttribute (nsIAtom *aName, const nsAString &aValue)
 Removes this control from its model's list of controls if a single node binding attribute is removed.
void RemoveIndexListeners ()
 Removes the index change event listeners.
nsresult ForceModelDetach (PRBool aRebind)
 Forces detaching from the model.
nsresult MaybeAddToModel (nsIModelElementPrivate *aOldModel, nsIXFormsControl *aParent)
 Adds the form control to the model, if the model has changed.
nsresult GetBoundBuiltinType (PRUint16 *aBuiltinType)
 Returns the nsISchemaBuiltinType of the node to which this element is bound.
virtual nsRepeatState UpdateRepeatState (nsIDOMNode *aParent)
 This is called when the parent node for a XForms control changes.

Protected Attributes

nsIDOMElementmElement
 The nsIXTFElementWrapper.
nsCOMPtr< nsIDOMNodemBoundNode
 The node that the control is bound to.
nsCOMArray< nsIDOMNodemDependencies
 Array of nsIDOMNodes that the control depends on.
nsCOMPtr< nsIModelElementPrivatemModel
 The model for the control.
nsCOMPtr< nsIDOMEventListenermEventListener
 This event listener is used to create xforms-hint and xforms-help events.
PRPackedBool mHasParent
 State that tells whether control has a parent or not.
PRPackedBool mHasDoc
 State that tells whether control has a parent or not.
PRPackedBool mPreventLoop
 State to prevent infinite loop when generating and handling xforms-next and xforms-previous events.
PRPackedBool mUsesModelBinding
 Does the control use a model bind? That is, does it have a .
PRPackedBool mAppearDisabled
 Should the control appear disabled.
PRPackedBool mOnDeferredBindList
 Indicates whether this control is already on the deferred bind list.
PRInt8 mBindAttrsCount
 Used to keep track of whether this control has any single node binding attributes.
nsRepeatState mRepeatState
nsCOMArray
< nsIXFormsRepeatElement
mIndexesUsed
 List of repeats that the node binding depends on.
nsCOMArray< nsIXFormsControlmAbortedBindList
 List of XForms elements contained by this control who tried to bind and couldn't because this control wasn't ready to bind, yet.
nsCOMPtr< nsIXFormsContextControlmAbortedBindListContainer
 The control that contains the aborted bind list that this control is on.

Detailed Description

Common stub for all XForms controls that inherit from nsIXFormsControl and is bound to an instance node.

Definition at line 67 of file nsXFormsControlStub.h.


Constructor & Destructor Documentation

NS_DECL_NSIXFORMSCONTEXTCONTROL nsXFormsControlStubBase::nsXFormsControlStubBase ( ) [inline]

Member Function Documentation

Each context control maintains an 'aborted bind' list.

This list is used to track xforms controls that this context control contains which have tried to bind but couldn't because this context control wasn't bound yet, either.

Parameters:
aControlThe XForms control that couldn't bind because this context control wasn't ready.
addControlIf true, aControl is added to the list. If false aControl will be removed from the list and also aControl will lose its link to this control.
void nsXFormsControlStubBase::AddRemoveSNBAttr ( nsIAtom aName,
const nsAString &  aValue 
)

This function manages the mBindAttrsCount value.

mBindAttrsCount will be incremented if a single node binding attribute is specified that isn't currently on the control AND aValue isn't empty. Otherwise, if the control already contains this attribute with a non-empty value and aValue is empty, then mBindAttrsCount is decremented.

aName - Atom of the single node binding attribute ('bind', 'ref', etc.). Using an atom to make it a tad harder to misuse by passing in any old string, for instance. Since different controls may have different binding attrs, we do NO validation on the attr. We assume that the caller is smart enough to only send us a binding attr atom. aValue - The string value that the SNB attribute is being set to.

Definition at line 934 of file nsXFormsControlStub.cpp.

{
  nsAutoString attrStr, attrValue;
  aName->ToString(attrStr);
  mElement->GetAttribute(attrStr, attrValue);

  // if we are setting a single node binding attribute that we don't already
  // have, bump the count.
  if (!aValue.IsEmpty() && attrValue.IsEmpty()) {
    ++mBindAttrsCount;
  } else if (!attrValue.IsEmpty()) { 
    // if we are setting a currently existing binding attribute to have an
    // empty value, treat it like the binding attr is being removed.
    --mBindAttrsCount;
    NS_ASSERTION(mBindAttrsCount>=0, "bad mojo!  mBindAttrsCount < 0!");
  }
}

Here is the caller graph for this function:

void nsXFormsControlStubBase::AfterSetAttribute ( nsIAtom aName) [protected, virtual]

Causes Bind() and Refresh() to be called if aName is the atom of a single node binding attribute for this control.

Called by AttributeSet and AttributeRemoved.

Reimplemented in nsXFormsRepeatElement.

Definition at line 965 of file nsXFormsControlStub.cpp.

{
  if (IsBindingAttribute(aName)) {
    PRBool dummy;
    nsresult rv = Bind(&dummy);
    if (NS_SUCCEEDED(rv) &&
        rv != NS_OK_XFORMS_DEFERRED && rv != NS_OK_XFORMS_NOTREADY)
      Refresh();
  }

}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsMessageElement, and nsXFormsLabelElement.

Definition at line 810 of file nsXFormsControlStub.cpp.

{
  AfterSetAttribute(aName);
  return NS_OK;
}

Here is the call graph for this function:

nsresult nsXFormsControlStubBase::AttributeSet ( nsIAtom aName,
const nsAString &  aValue 
)

Reimplemented in nsXFormsBindableControlStub, nsXFormsMessageElement, and nsXFormsLabelElement.

Definition at line 796 of file nsXFormsControlStub.cpp.

{
  AfterSetAttribute(aName);
  return NS_OK;
}

Here is the call graph for this function:

void nsXFormsControlStubBase::BeforeSetAttribute ( nsIAtom aName,
const nsAString &  aValue 
) [protected]

Removes this control from its model's list of controls if a single node binding attribute is removed.

Called by WillSetAttribute and WillRemoveAttribute.

Parameters:
aName- atom of the attribute being changed
aValue- value that the attribute is being changed to.

Definition at line 978 of file nsXFormsControlStub.cpp.

{
  if (IsBindingAttribute(aName)) {
    AddRemoveSNBAttr(aName, aValue);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

This tells the form control to update its node binding based on the current instance data.

Returns:
Did the binding change the context?

Reimplemented in nsXFormsRepeatElement, nsXFormsContextContainer, nsXFormsOutputElement, and nsXFormsItemSetElement.

Definition at line 234 of file nsXFormsControlStub.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIXFormsControl::bindToModel ( in boolean  setBoundNode) [inherited]

Binds the control to the model.

Only handles attaching to the model (including reattaching from any old model).

Note:
It can also set the boundNode, but does not do a proper node binding, as in setting up dependencies, attaching index() listeners, etc.
Parameters:
setBoundNodeSet boundNode too?

Definition at line 431 of file nsXFormsControlStub.cpp.

{
  if (GetRepeatState() == eType_Template) {
    // No sense going any further.  A template control has no need to bind,
    // refresh, etc. so no reason to put it on the model's control list
    return NS_OK;
  }

  nsCOMPtr<nsIModelElementPrivate> oldModel(mModel);

  nsCOMPtr<nsIXFormsControl> parentControl;
  nsCOMPtr<nsIDOMNode> boundNode;
  mModel = nsXFormsUtils::GetModel(mElement, getter_AddRefs(parentControl),
                                   kElementFlags,
                                   getter_AddRefs(boundNode));
  if (aSetBoundNode) {
    mBoundNode.swap(boundNode);
  }

  return MaybeAddToModel(oldModel, parentControl);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 622 of file nsXFormsControlStub.cpp.

{
  aWrapper->SetNotificationMask(kStandardNotificationMask);

  // It's ok to keep a weak pointer to mElement.  mElement will have an
  // owning reference to this object, so as long as we null out mElement in
  // OnDestroyed, it will always be valid.
  nsCOMPtr<nsIDOMElement> node;
  aWrapper->GetElementNode(getter_AddRefs(node));
  mElement = node;
  NS_ASSERTION(mElement, "Wrapper is not an nsIDOMElement, we'll crash soon");

#ifdef DEBUG_smaug
  sControlList->AppendElement(this);
#endif

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsContextContainer, nsXFormsItemSetElement, and nsXFormsActionElement.

Definition at line 736 of file nsXFormsControlStub.cpp.

{
  mHasDoc = aNewDocument != nsnull;

  if (aNewDocument) {
    ResetHelpAndHint(PR_TRUE);

    // If we are inserted into a document and we have no model, we are probably
    // being initialized, so we should set our intrinsic state to the default
    // value
    if (!mModel && mElement) {
      nsCOMPtr<nsIXTFElementWrapper> xtfWrap(do_QueryInterface(mElement));
      NS_ENSURE_STATE(xtfWrap);
      PRInt32 iState;
      GetDefaultIntrinsicState(&iState);
      xtfWrap->SetIntrinsicState(iState);
    }
  }

  nsCOMPtr<nsIDOMNode> parent;
  mElement->GetParentNode(getter_AddRefs(parent));
  UpdateRepeatState(parent);

  return ForceModelDetach(mHasParent && mHasDoc);
}

Here is the call graph for this function:

Forces detaching from the model.

Parameters:
aRebindTry rebinding to a new model?

Definition at line 663 of file nsXFormsControlStub.cpp.

{
  // We shouldn't bother binding if the control is part of a template, but we
  // need to run through RemoveFormControl in the event that this control
  // was just moved under a repeat or itemset and wasn't there originally.
  if (mModel) {
    // Remove from model, so Bind() will be forced to reattach
    mModel->RemoveFormControl(this);
    mModel = nsnull;
  }

  if (!aRebind || GetRepeatState() == eType_Template) {
    return NS_OK;
  }

  PRBool dummy;
  nsresult rv = Bind(&dummy);
  NS_ENSURE_SUCCESS(rv, rv);

  if (rv == NS_OK_XFORMS_DEFERRED || rv == NS_OK_XFORMS_NOTREADY) {
    return NS_OK;
  }

  // If there were any controls that had already tried to bind but failed
  // to because this control wasn't ready yet, then try them again.
  PRInt32 arraySize = mAbortedBindList.Count();
  if (arraySize) {
    for (PRInt32 i = 0; i < arraySize; ++i) {
      nsCOMPtr<nsIXFormsControl> control = mAbortedBindList.ObjectAt(i);
      if (control) {
        control->RebindAndRefresh();
        control->SetAbortedBindListContainer(nsnull);
      }
    }
  
    mAbortedBindList.Clear();
  }

  return Refresh();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 903 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG_POINTER(aControlContainingList);

  NS_IF_ADDREF(*aControlContainingList = mAbortedBindListContainer);
  return NS_OK;
}

Here is the caller graph for this function:

Returns the nsISchemaBuiltinType of the node to which this element is bound.

Definition at line 987 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG_POINTER(aBuiltinType);
  *aBuiltinType = 0;

  NS_ENSURE_STATE(mModel);

  // get type of bound instance data
  nsCOMPtr<nsISchemaType> schemaType;
  nsresult rv = mModel->GetTypeForControl(this, getter_AddRefs(schemaType));
  NS_ENSURE_SUCCESS(rv, rv);

  return mModel->GetRootBuiltinType(schemaType, aBuiltinType);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in nsXFormsOutputElement.

Definition at line 108 of file nsXFormsControlStub.cpp.

{
  NS_IF_ADDREF(*aBoundNode = mBoundNode);
  return NS_OK;  
}

Here is the caller graph for this function:

void nsIXFormsContextControl::getContext ( out AString  aModelID,
out nsIDOMNode  aContextNode,
out long  aContextPosition,
out long  aContextSize 
) [inherited]

Used by children to retrieve the context of their parent.

Parameters:
aModelIDThe modelID
aContextNodeThe context node
aContextPositionThe context position
aContextSizeThe context size
Note:
The actual model ID must be returned. An empty |aModelID| should only be returned if the default model has an id="".

Reimplemented in nsXFormsSelect1Element, nsXFormsSelectElement, and nsXFormsRangeElement.

Definition at line 294 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG_POINTER(aState);
  *aState = kDefaultIntrinsicState;
  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 115 of file nsXFormsControlStub.cpp.

{
  if (aDependencies)
    *aDependencies = &mDependencies;
  return NS_OK;  
}

Reimplemented in nsXFormsSelect1Element, nsXFormsSelectElement, and nsXFormsRangeElement.

Definition at line 302 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG_POINTER(aState);
  *aState = kDisabledIntrinsicState;
  return NS_OK;
}

Here is the caller graph for this function:

Definition at line 123 of file nsXFormsControlStub.cpp.

{
  NS_IF_ADDREF(*aElement = mElement);
  return NS_OK;  
}

Definition at line 279 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG_POINTER(aOnList);
  *aOnList = mOnDeferredBindList;
  return NS_OK;
}

Returns the relevant state of the control.

Definition at line 489 of file nsXFormsControlStub.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Get/Set the repeat state for the control.

The repeat state indicates whether the control lives inside a context container, a repeat element, an itemset or non of the above.

Definition at line 1034 of file nsXFormsControlStub.cpp.

{
  return mRepeatState;
}

Here is the caller graph for this function:

Definition at line 265 of file nsXFormsControlStub.cpp.

{
  *aRes = mUsesModelBinding;
  return NS_OK;
}

Reimplemented in nsXFormsRepeatElement, and nsXFormsItemSetElement.

Definition at line 272 of file nsXFormsControlStub.cpp.

{
  *aRes = PR_TRUE;
  return NS_OK;
}

Reimplemented in nsXFormsBindableControlStub, and nsXFormsSubmitElement.

Definition at line 500 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG(aHandled);
  *aHandled = PR_FALSE;

  if (nsXFormsUtils::EventHandlingAllowed(aEvent, mElement)) {

    // Check that we are the target of the event
    nsCOMPtr<nsIDOMEventTarget> target;
    aEvent->GetTarget(getter_AddRefs(target));
    nsCOMPtr<nsIDOMElement> targetE(do_QueryInterface(target));
    if (targetE && targetE != mElement) {
      return NS_OK;
    }

    // Handle event
    nsAutoString type;
    aEvent->GetType(type);

    if (type.EqualsASCII(sXFormsEventsEntries[eEvent_Focus].name)) {
      TryFocus(aHandled);
    } else if (type.Equals(NS_LITERAL_STRING("keypress"))) { 
      nsCOMPtr<nsIDOMKeyEvent> keyEvent = do_QueryInterface(aEvent);
      if (keyEvent) {
        PRUint32 keycode;
        keyEvent->GetKeyCode(&keycode);
        if (keycode == nsIDOMKeyEvent::DOM_VK_TAB) {
          PRBool extraKey = PR_FALSE;

          keyEvent->GetAltKey(&extraKey);
          if (extraKey) {
            return NS_OK;
          }

          keyEvent->GetCtrlKey(&extraKey);
          if (extraKey) {
            return NS_OK;
          }

          keyEvent->GetMetaKey(&extraKey);
          if (extraKey) {
            return NS_OK;
          }

          keyEvent->GetShiftKey(&extraKey);
          mPreventLoop = PR_TRUE;
          if (extraKey) {
            nsXFormsUtils::DispatchEvent(mElement, eEvent_Previous);
          } else {
            nsXFormsUtils::DispatchEvent(mElement, eEvent_Next);
          }
        }
      }
    } else if (type.EqualsASCII(sXFormsEventsEntries[eEvent_Next].name) ||     
               type.EqualsASCII(sXFormsEventsEntries[eEvent_Previous].name)) { 

      // only continue this processing if xforms-next or xforms-previous were
      // dispatched by the form and not as part of the 'tab' and 'shift+tab'
      // processing
      if (mPreventLoop) {
        mPreventLoop = PR_FALSE;
        return NS_OK;
      }

      nsCOMPtr<nsIDOMDocument> domDoc;
      mElement->GetOwnerDocument(getter_AddRefs(domDoc));

      nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
      // element isn't in a document, yet?  Odd, indeed.  Well, if not in
      // document, these two events have no meaning.
      NS_ENSURE_TRUE(doc, NS_ERROR_UNEXPECTED);
    
      // An inelegant way to retrieve this to be sure, but we are
      // guaranteed that the focus controller outlives us, so it
      // is safe to hold on to it (since we can't die until it has
      // died).
      nsIFocusController *focusController =
        doc->GetWindow()->GetRootFocusController();
      if (focusController &&
          type.EqualsASCII(sXFormsEventsEntries[eEvent_Next].name)) {
        focusController->MoveFocus(PR_TRUE, nsnull);
      } else {
        focusController->MoveFocus(PR_FALSE, nsnull);
      }
    } else if (type.EqualsASCII(sXFormsEventsEntries[eEvent_BindingException].name)) {
      // we threw up a popup during the nsXFormsUtils::DispatchEvent that sent
      // this error to this control
      *aHandled = PR_TRUE;
    }
  }
  
  return NS_OK;
}

Here is the call graph for this function:

Does control have a binding attribute?

Definition at line 264 of file nsXFormsControlStub.h.

{ return mBindAttrsCount != 0; };

Here is the caller graph for this function:

PRBool nsXFormsControlStubBase::IsBindingAttribute ( const nsIAtom aAttr) const [protected, virtual]

Checks whether an attribute is a binding attribute for the control.

This should be overriden by controls that have "non-standard" binding attributes.

Parameters:
aAttrThe attribute to check.

Reimplemented in nsXFormsRepeatElement.

Definition at line 953 of file nsXFormsControlStub.cpp.

{
  if (aAttr == nsXFormsAtoms::bind ||
      aAttr == nsXFormsAtoms::ref  ||
      aAttr == nsXFormsAtoms::model) {
    return PR_TRUE;
  }
  
  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

This function is overridden by controls that are restricted in the type of content that may be bound to the control.

For example, xf:input may only be bound to simpleContent.

Reimplemented in nsXFormsTextareaElement, nsXFormsOutputElement, nsXFormsSelect1Element, nsXFormsSelectElement, and nsXFormsInputElement.

Definition at line 1003 of file nsXFormsControlStub.cpp.

{
  return PR_TRUE;
}

Here is the caller graph for this function:

This function determines if the content to which the control is being bound is complex; ie contains Element children.

Definition at line 1009 of file nsXFormsControlStub.cpp.

{
  PRBool isComplex = PR_FALSE;

  if (mBoundNode) {
    // If the bound node has any Element children, then it has complexContent.
    nsCOMPtr<nsIDOMNode> currentNode;
    mBoundNode->GetFirstChild(getter_AddRefs(currentNode));
    while (currentNode) {
      PRUint16 nodeType;
      currentNode->GetNodeType(&nodeType);
      if (nodeType == nsIDOMNode::ELEMENT_NODE) {
        isComplex = PR_TRUE;
        break;
      }

      nsCOMPtr<nsIDOMNode> node;
      currentNode->GetNextSibling(getter_AddRefs(node));
      currentNode.swap(node);
    }
  }
  return isComplex;
}

Here is the call graph for this function:

Here is the caller graph for this function:

According to sec 4.1 in the spec, only certain controls are allowed to be targets of the interaction and notification events.

The controls that inherit from nsXFormsControlStub that SHOULDN'T get these events need to override IsEventTarget() and return PR_FALSE

Adds the form control to the model, if the model has changed.

Parameters:
aOldModelThe previous model the control was bound to
aParentThe parent XForms control

Definition at line 310 of file nsXFormsControlStub.cpp.

{
  if (GetRepeatState() == eType_Template) {
    // No sense going any further.  A template control has no need to bind,
    // refresh, etc. so no reason to put it on the model's control list
    return NS_OK;
  }

  // XXX: just doing pointer comparison would be nice....
  PRBool sameModel = PR_FALSE;
  nsresult rv;

  if (mModel) {
    nsCOMPtr<nsIDOM3Node> n3Model(do_QueryInterface(mModel));
    nsCOMPtr<nsIDOMNode> nOldModel(do_QueryInterface(aOldModel));
    NS_ASSERTION(n3Model, "model element not supporting nsIDOM3Node?!");
    rv = n3Model->IsSameNode(nOldModel, &sameModel);
    NS_ENSURE_SUCCESS(rv, rv);
  } else {
    sameModel = !aOldModel;
  }

  if (!sameModel) {
    if (aOldModel) {
      rv = aOldModel->RemoveFormControl(this);
      NS_ENSURE_SUCCESS(rv, rv);
    }
    if (mModel) {
      rv = mModel->AddFormControl(this, aParent);
      NS_ENSURE_SUCCESS(rv, rv);
    }
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsRepeatElement, nsXFormsMessageElement, nsXFormsLabelElement, nsXFormsDelegateStub, and nsXFormsActionElement.

Definition at line 642 of file nsXFormsControlStub.cpp.

{
  RemoveIndexListeners();
  mDependencies.Clear();

  if (mModel) {
    mModel->RemoveFormControl(this);
    mModel = nsnull;
  }

  mAbortedBindListContainer = nsnull;

#ifdef DEBUG_smaug
  sControlList->RemoveElement(this);
#endif

  mElement = nsnull;
  return NS_OK;
}

Here is the call graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsMessageElement, nsXFormsItemElement, nsXFormsItemSetElement, and nsXFormsActionElement.

Definition at line 777 of file nsXFormsControlStub.cpp.

{
  mHasParent = aNewParent != nsnull;

  UpdateRepeatState(aNewParent);

  // We need to re-evaluate our instance data binding when our parent changes,
  // since xmlns declarations or our context could have changed.
  return ForceModelDetach(mHasParent && mHasDoc);
}

Here is the call graph for this function:

nsresult nsXFormsControlStubBase::ProcessNodeBinding ( const nsString aBindingAttr,
PRUint16  aResultType,
nsIDOMXPathResult **  aResult,
nsIModelElementPrivate **  aModel = nsnull 
) [protected]

Processes the node binding of a control, get the current Model (mModel) and binds the control to it.

Note:
Will return NS_OK_XFORMS_DEFERRED if the binding is being deferred.
Parameters:
aBindingAttrThe default binding attribute
aResultTypeThe XPath result type requested
aResultThe XPath result
aModelThe model

Definition at line 348 of file nsXFormsControlStub.cpp.

{
  nsStringArray indexesUsed;

  if (aResult) {
    *aResult = nsnull;
  }

  if (aModel) {
    *aModel = nsnull;
  }

  // let's not go through all of this rigamarol if we don't have a chance
  // in heck of binding anyhow.  Check to see if the models will be receptive
  // to some binding.  readyForBindProperty is set when they are.  Make sure
  // to return NS_OK so that we don't start complaining about binding
  // failures in this situation.

  if (!nsXFormsUtils::IsDocumentReadyForBind(mElement)) {
    nsXFormsModelElement::DeferElementBind(this);
    return NS_OK_XFORMS_DEFERRED;
  }

  nsresult rv;
  PRBool usesModelBinding;
  nsCOMPtr<nsIModelElementPrivate> oldModel(mModel);
  nsCOMPtr<nsIXFormsControl> parentControl;
  rv = nsXFormsUtils::EvaluateNodeBinding(mElement,
                                          kElementFlags,
                                          aBindingAttr,
                                          EmptyString(),
                                          aResultType,
                                          getter_AddRefs(mModel),
                                          aResult,
                                          &usesModelBinding,
                                          getter_AddRefs(parentControl),
                                          &mDependencies,
                                          &indexesUsed);
  NS_ENSURE_SUCCESS(rv, rv);

  // if NS_OK_XFORMS_NOTREADY, mModel probably won't exist or might no longer
  // be valid, so shouldn't continue.
  if (rv == NS_OK_XFORMS_NOTREADY) {
    return rv;
  }

  NS_ENSURE_STATE(mModel);

  rv = MaybeAddToModel(oldModel, parentControl);
  NS_ENSURE_SUCCESS(rv, rv);

  if (aModel)
    NS_ADDREF(*aModel = mModel);

  mUsesModelBinding = usesModelBinding;

  if (indexesUsed.Count()) {
    // add index listeners on repeat elements

    for (PRInt32 i = 0; i < indexesUsed.Count(); ++i) {
      // Find the repeat element and add |this| as a listener
      nsCOMPtr<nsIDOMElement> repElem;
      nsXFormsUtils::GetElementByContextId(mElement, *(indexesUsed[i]),
                                           getter_AddRefs(repElem));
      nsCOMPtr<nsIXFormsRepeatElement> rep(do_QueryInterface(repElem));
      if (!rep)
        continue;

      rv = rep->AddIndexUser(this);
      NS_ENSURE_SUCCESS(rv, rv);

      rv = mIndexesUsed.AppendObject(rep);
      NS_ENSURE_SUCCESS(rv, rv);
    }
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 817 of file nsXFormsControlStub.cpp.

Here is the call graph for this function:

This method is used to force the control to recalculate its bound node and to refresh.

Used primarily internally to correct situations where DOM manipulations have gotten things out of balance.

This tells the form control to update its state based on the current instance data.

Reimplemented in nsXFormsRepeatElement, nsXFormsItemElement, nsXFormsOutputElement, nsXFormsItemSetElement, nsXFormsDelegateStub, nsXFormsLabelElement, nsXFormsSelect1Element, and nsXFormsSelectElement.

Definition at line 242 of file nsXFormsControlStub.cpp.

{
  // XXX: In theory refresh should never be called when there is no model,
  // but that's definately not the case now.
  return (mModel && !mAppearDisabled) ? mModel->SetStates(this, mBoundNode)
                                      : NS_OK;
}

Here is the caller graph for this function:

Removes the index change event listeners.

Definition at line 130 of file nsXFormsControlStub.cpp.

{
  if (!mIndexesUsed.Count())
    return;

  for (PRInt32 i = 0; i < mIndexesUsed.Count(); ++i) {
    nsCOMPtr<nsIXFormsRepeatElement> rep = mIndexesUsed[i];
    rep->RemoveIndexUser(this);
  }

  mIndexesUsed.Clear();
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsXFormsControlStubBase::ResetBoundNode ( const nsString aBindAttribute,
PRUint16  aResultType,
PRBool aContextChanged 
)

Definition at line 144 of file nsXFormsControlStub.cpp.

{
  NS_ENSURE_ARG(aContextChanged);

  // Clear existing bound node, etc.
  *aContextChanged = mBoundNode ? PR_TRUE : PR_FALSE;
  nsCOMPtr<nsIDOMNode> oldBoundNode;
  oldBoundNode.swap(mBoundNode);
  mUsesModelBinding = PR_FALSE;
  mAppearDisabled = PR_FALSE;
  mDependencies.Clear();
  RemoveIndexListeners();

  if (!mHasParent || !mHasDoc || !HasBindingAttribute())
    return NS_OK_XFORMS_NOTREADY;

  nsCOMPtr<nsIDOMXPathResult> result;
  nsresult rv = ProcessNodeBinding(aBindAttribute, aResultType,
                                   getter_AddRefs(result));

  if (NS_FAILED(rv)) {
    nsXFormsUtils::ReportError(NS_LITERAL_STRING("controlBindError"), mElement);
    return rv;
  }

  if (rv == NS_OK_XFORMS_DEFERRED || rv == NS_OK_XFORMS_NOTREADY || !result) {
    // Binding was deferred, or not bound
    return rv;
  }

  // Get context node, if any
  if (mUsesModelBinding) {
    // When bound via @bind, we'll get a snapshot back
    result->SnapshotItem(0, getter_AddRefs(mBoundNode));
  } else {
    result->GetSingleNodeValue(getter_AddRefs(mBoundNode));
  }

  *aContextChanged = (oldBoundNode != mBoundNode);

  // Some controls may not be bound to certain types of content. If the content
  // is a disallowed type, report the error and dispatch a binding exception
  // event.
  PRBool isAllowed = IsContentAllowed();

  if (!mBoundNode || !isAllowed) {
    // If there's no result (ie, no instance node) returned by the above, it
    // means that the binding is not pointing to an instance data node, so we
    // should disable the control.
    mAppearDisabled = PR_TRUE;

    if (!isAllowed) {
      // build the error string that we want output to the ErrorConsole
      nsAutoString localName;
      mElement->GetLocalName(localName);
      const PRUnichar *strings[] = { localName.get() };

      nsXFormsUtils::ReportError(
        NS_LITERAL_STRING("boundTypeErrorComplexContent"),
        strings, 1, mElement, mElement);

      nsXFormsUtils::DispatchEvent(mElement, eEvent_BindingException);
    }

    nsCOMPtr<nsIXTFElementWrapper> wrapper(do_QueryInterface(mElement));
    NS_ENSURE_STATE(wrapper);

    PRInt32 iState;
    GetDisabledIntrinsicState(&iState);
    return wrapper->SetIntrinsicState(iState);
  }

  // Check for presence of @xsi:type on bound node and add as a dependency
  nsCOMPtr<nsIDOMElement> boundEl(do_QueryInterface(mBoundNode));
  if (boundEl) {
    nsCOMPtr<nsIDOMAttr> attrNode;
    rv = boundEl->GetAttributeNodeNS(NS_LITERAL_STRING(NS_NAMESPACE_XML_SCHEMA_INSTANCE),
                                     NS_LITERAL_STRING("type"),
                                     getter_AddRefs(attrNode));
    if (NS_SUCCEEDED(rv) && attrNode) {
      mDependencies.AppendObject(attrNode);
    }
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reset (and reinitialize) the event listener, which is used to create xforms-hint and xforms-help events.

Definition at line 454 of file nsXFormsControlStub.cpp.

{
  nsCOMPtr<nsIDOMEventTarget> targ(do_QueryInterface(mElement));
  if (!targ)
    return;

  NS_NAMED_LITERAL_STRING(mouseover, "mouseover");
  NS_NAMED_LITERAL_STRING(mouseout, "mouseout");
  NS_NAMED_LITERAL_STRING(focus, "focus");
  NS_NAMED_LITERAL_STRING(blur, "blur");
  NS_NAMED_LITERAL_STRING(keypress, "keypress");

  if (mEventListener) {
    targ->RemoveEventListener(mouseover, mEventListener, PR_TRUE);
    targ->RemoveEventListener(mouseout, mEventListener, PR_TRUE);
    targ->RemoveEventListener(focus, mEventListener, PR_TRUE);
    targ->RemoveEventListener(blur, mEventListener, PR_TRUE);
    targ->RemoveEventListener(keypress, mEventListener, PR_TRUE);
    mEventListener = nsnull;
  }

  if (aInitialize) {
    mEventListener = new nsXFormsHintHelpListener();
    if (!mEventListener)
      return;

    targ->AddEventListener(mouseover, mEventListener, PR_TRUE);
    targ->AddEventListener(mouseout, mEventListener, PR_TRUE);
    targ->AddEventListener(focus, mEventListener, PR_TRUE);
    targ->AddEventListener(blur, mEventListener, PR_TRUE);
    targ->AddEventListener(keypress, mEventListener, PR_TRUE);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 913 of file nsXFormsControlStub.cpp.

{
  // A control should never be on more than one aborted bind list.  There is
  // probably a chance through some crazy DOM stirring for a control to be
  // waiting on notification from a context control and then the control finds
  // itself trying to bind again under a whole different parent tree.  So we'll
  // have the control remove itself from the old list and link itself to the
  // new list.

  if (mAbortedBindListContainer && aControlContainingList) {
    if (!SameCOMIdentity(mAbortedBindListContainer, aControlContainingList)) {
      mAbortedBindListContainer->AddRemoveAbortedControl(this, PR_FALSE);
    }
  }

  mAbortedBindListContainer = aControlContainingList;
  return NS_OK;
}

Here is the call graph for this function:

void nsIXFormsContextControl::setContext ( in nsIDOMNode  aContextNode,
in long  aContextPosition,
in long  aContextSize 
) [inherited]

Used by parents to set the context for children.

Parameters:
aContextNodeThe context node
aContextPositionThe context position
aContextSizeThe context size

Definition at line 287 of file nsXFormsControlStub.cpp.

{
  mOnDeferredBindList = aPutOnList;
  return NS_OK;
}

Reimplemented in nsXFormsContextContainer.

Definition at line 1040 of file nsXFormsControlStub.cpp.

{
  mRepeatState = aState;
  return;
}

Here is the caller graph for this function:

Tries to move focus to form control and returns true if succeeded.

Reimplemented in nsXFormsRepeatElement, nsXFormsGroupElement, and nsXFormsDelegateStub.

Definition at line 251 of file nsXFormsControlStub.cpp.

{
  *aOK = PR_FALSE;
  return NS_OK;
}

Here is the caller graph for this function:

This is called when the parent node for a XForms control changes.

It checks the ancestors of the element and returns an nsRepeatState depending on the element's place in the document.

Parameters:
aParentThe new parent of the XForms control

Reimplemented in nsXFormsRepeatElement.

Definition at line 1047 of file nsXFormsControlStub.cpp.

{
  // Walk up the parent chain looking to see if the this control is contained
  // in an item.  If it is and that item is contained in a itemset, then we
  // know that this control was generated as a clone from the itemset's
  // template.  Similarly, we'll check to see if this control lives in a
  // contextcontainer (meaning it was cloned from a repeat's template).
  // Otherwise, if neither of these are the case but it lives under a repeat
  // or an itemset, then this control must be part of a template.  A template
  // is the content of a repeat or itemset that gets cloned once for every
  // node in the bound nodeset.
  //
  // If none of this applies, we'll return eType_NotApplicable to show that this
  // control isn't bound to a repeating nodeset.
  nsRepeatState repeatState = eType_NotApplicable;

  if (!mHasDoc || !mHasParent) {
    // If we don't have a document or a parent, none of these tests will work
    // correctly so no sense doing them now.  If either of these are false the
    // repeat state for the object should already be eType_Unknown so just
    // return that now.
    return eType_Unknown;
  }

  nsCOMPtr<nsIDOMNode> parent = aParent;
  PRBool childIsItem = PR_FALSE;
  while (parent) {
    if (nsXFormsUtils::IsXFormsElement(parent,
                                       NS_LITERAL_STRING("contextcontainer"))) {
      repeatState = eType_GeneratedContent;
      break;
    }
    if (nsXFormsUtils::IsXFormsElement(parent, NS_LITERAL_STRING("repeat"))) {
      repeatState = eType_Template;
      break;
    }
    if (nsXFormsUtils::IsXFormsElement(parent, NS_LITERAL_STRING("itemset"))) {
      if (childIsItem) {
        repeatState = eType_GeneratedContent;
        break;
      }
      repeatState = eType_Template;
      break;
    }

    if (nsXFormsUtils::IsXFormsElement(parent, NS_LITERAL_STRING("item"))) {
      childIsItem = PR_TRUE;
    } else {

      nsCOMPtr<nsIDOMElement> parentEle(do_QueryInterface(parent));
      if (!parentEle) {
        // I don't know how this can possibly happen, but if it does I guess
        // we should just ignore it and coninue on our way.
        break;
      }

      // if this control is contained underneath an element that contains
      // an xforms binding attribute that introduces an anonymous xf:repeat
      // then the control is part of a template
      PRBool repeatAttr = PR_FALSE;
      parentEle->HasAttributeNS(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS),
                                NS_LITERAL_STRING("repeat-bind"),
                                &repeatAttr);
      if (repeatAttr) {
        repeatState = eType_Template;
        break;
      }

      parentEle->HasAttributeNS(NS_LITERAL_STRING(NS_NAMESPACE_XFORMS),
                                NS_LITERAL_STRING("repeat-nodeset"),
                                &repeatAttr);
      if (repeatAttr) {
        repeatState = eType_Template;
        break;
      }
    }
    nsCOMPtr<nsIDOMNode> tmp;
    parent->GetParentNode(getter_AddRefs(tmp));
    parent = tmp;
  }

  SetRepeatState(repeatState);
  return repeatState;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsMessageElement, nsXFormsItemSetElement, and nsXFormsActionElement.

Definition at line 705 of file nsXFormsControlStub.cpp.

{
  // This control is moving to another document or just plain getting removed
  // from its current document.  In either case, we know that we don't care
  // about the bind-ready notification we might have been waiting on.
  nsCOMPtr<nsIXFormsContextControl> ctxtControl;
  GetAbortedBindListContainer(getter_AddRefs(ctxtControl));
  if (ctxtControl) {
    ctxtControl->AddRemoveAbortedControl(this, PR_FALSE);
  }

  // If we are in the middle of getting set up in the current document then
  // then we need to make sure that if other controls getting set up in
  // the current document are depending on this control to help them, that
  // we remove that dependency.
  PRInt32 arraySize = mAbortedBindList.Count();
  if (arraySize) {
    for (PRInt32 i = 0; i < arraySize; ++i) {
      nsCOMPtr<nsIXFormsControl> control = mAbortedBindList.ObjectAt(i);
      control->SetAbortedBindListContainer(nsnull);
    }

    mAbortedBindList.Clear();
  }

  SetRepeatState(eType_Unknown);
  ResetHelpAndHint(PR_FALSE);
  return NS_OK;
}

Here is the call graph for this function:

Reimplemented in nsXFormsBindableControlStub, nsXFormsMessageElement, nsXFormsItemSetElement, and nsXFormsActionElement.

Definition at line 763 of file nsXFormsControlStub.cpp.

{
  nsCOMPtr<nsIXFormsContextControl> ctxtControl;
  GetAbortedBindListContainer(getter_AddRefs(ctxtControl));
  if (ctxtControl) {
    ctxtControl->AddRemoveAbortedControl(this, PR_FALSE);
  }

  SetRepeatState(eType_Unknown);
  return NS_OK;
}

Here is the call graph for this function:

Reimplemented in nsXFormsBindableControlStub.

Definition at line 803 of file nsXFormsControlStub.cpp.

{
  BeforeSetAttribute(aName, EmptyString());
  return NS_OK;
}

Here is the call graph for this function:

nsresult nsXFormsControlStubBase::WillSetAttribute ( nsIAtom aName,
const nsAString &  aValue 
)

Reimplemented in nsXFormsBindableControlStub.

Definition at line 789 of file nsXFormsControlStub.cpp.

{
  BeforeSetAttribute(aName, aValue);
  return NS_OK;
}

Here is the call graph for this function:


Member Data Documentation

The keeper of the aborted bind list, if any, that this control is currently listed on.

In other words, if this control tried to bind and couldn't, we added it to the appropriate context control's aborted bind list so that this control could bind as soon as the context control is able to bind. But if this control is removed from the DOM before it has a chance to be processed, we should remove it from the list so that it can be cleaned up appropriately.

Definition at line 138 of file nsIXFormsControl.idl.

The instance node that the control is bound to.

Definition at line 63 of file nsIXFormsControl.idl.

These represent the default intrinsic states for controls when they are enabled and disabled.

Definition at line 117 of file nsIXFormsControl.idl.

The instance nodes that the control depend on.

In other words, all the instance nodes that could influence which node the control is bound to (mBoundNode). For example: If a node has "/share[@owner = /me]", it depends on all /share nodes, all attributes on /share nodes, and all /me nodes.

Definition at line 84 of file nsIXFormsControl.idl.

Definition at line 118 of file nsIXFormsControl.idl.

Get the element that should receive events for the control.

Todo:
This should not be necessary, we should send directly to the control (XXX)

Definition at line 92 of file nsIXFormsControl.idl.

The element flags for the controls passed to nsXFormsUtils:EvaluateNodeBinding()

Definition at line 78 of file nsXFormsControlStub.h.

The standard notification flags set on nsIXTFElement.

Definition at line 72 of file nsXFormsControlStub.h.

List of XForms elements contained by this control who tried to bind and couldn't because this control wasn't ready to bind, yet.

This means that these contained nodes couldn't bind because they could be potentially using this control's bound node as a context node. When this control is ready to bind and successfully binds, then this list will be processed. And in turn, if these controls contain controls on THEIR mAbortedBindList, then they will be similarly processed.

Definition at line 253 of file nsXFormsControlStub.h.

The control that contains the aborted bind list that this control is on.

A control should never be on more than one list at a time.

Definition at line 259 of file nsXFormsControlStub.h.

Should the control appear disabled.

This is f.x. used when a valid single node binding is not pointing to an instance data node.

Definition at line 223 of file nsXFormsControlStub.h.

Used to keep track of whether this control has any single node binding attributes.

Definition at line 234 of file nsXFormsControlStub.h.

The node that the control is bound to.

Definition at line 192 of file nsXFormsControlStub.h.

Array of nsIDOMNodes that the control depends on.

Definition at line 195 of file nsXFormsControlStub.h.

The nsIXTFElementWrapper.

Definition at line 185 of file nsXFormsControlStub.h.

This event listener is used to create xforms-hint and xforms-help events.

Definition at line 201 of file nsXFormsControlStub.h.

State that tells whether control has a parent or not.

Definition at line 207 of file nsXFormsControlStub.h.

State that tells whether control has a parent or not.

Definition at line 204 of file nsXFormsControlStub.h.

List of repeats that the node binding depends on.

This happens when using the index() function in the binding expression.

Definition at line 242 of file nsXFormsControlStub.h.

The model for the control.

Definition at line 198 of file nsXFormsControlStub.h.

Indicates whether this control is already on the deferred bind list.

Definition at line 228 of file nsXFormsControlStub.h.

State to prevent infinite loop when generating and handling xforms-next and xforms-previous events.

Definition at line 212 of file nsXFormsControlStub.h.

Definition at line 236 of file nsXFormsControlStub.h.

Does the control use a model bind? That is, does it have a .

Definition at line 217 of file nsXFormsControlStub.h.

Determines whether this control is already on the deferred bind list.

Definition at line 59 of file nsIXFormsControlBase.idl.

Is true when the control is getting its instance data node binding from a model bind element, ie.

it has a |bind| attribute.

Definition at line 105 of file nsIXFormsControl.idl.

Is true when the control uses single node binding.

Will return false when the control uses node-set binding (i.e. repeat and itemset).

Definition at line 111 of file nsIXFormsControl.idl.


The documentation for this class was generated from the following files: