Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIModelElementPrivate Interface Reference

Private interface implemented by the model element for other elements to use. More...

import "nsIModelElementPrivate.idl";

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

List of all members.

Public Member Functions

void addFormControl (in nsIXFormsControl control, in nsIXFormsControl parent)
 Called by form control elements when they are bound to or unbound from this model.
void removeFormControl (in nsIXFormsControl control)
void instanceLoadStarted ()
 Notification that an instance element has started or finished loading its instance data.
void instanceLoadFinished (in boolean success, in AString uri)
nsIInstanceElementPrivate findInstanceElement (in AString id)
 Locate the instance element child with the given id.
void setNodeValue (in nsIDOMNode instanceNode, in AString nodeValue, in boolean doRefresh, out boolean nodeChanged)
 Set the value of an instance node.
void setNodeContent (in nsIDOMNode node, in nsIDOMNode content, in boolean doRebuild)
 Insert a set of nodes underneath an instance node.
PRBool validateNode (in nsIDOMNode aInstanceNode)
 Validates the instance node against the schemas loaded by the model.
unsigned short handleInstanceDataNode (in nsIDOMNode aInstanceDataNode)
 Handles an instance data node and returns one of the above 3 values.
void setStates (in nsIXFormsControl aControl, in nsIDOMNode aBoundNode)
 Set MIP states for given control bound to the given bound node.
void addInstanceElement (in nsIInstanceElementPrivate aInstanceElement)
 Add an instance element to the model's instance list.
void removeInstanceElement (in nsIInstanceElementPrivate aInstanceElement)
 Remove an instance element from the model's instance list.
void getTypeFromNode (in nsIDOMNode aInstanceData, out AString aType, out AString aNSUri)
 Retrieves the type for an instance data node.
void messageLoadFinished ()
 Notification that all of the external message loads have finished loading.
void requestRebuild ()
 Request an xforms-rebuild.
void requestRecalculate ()
 Request an xforms-recalculate.
void requestRevalidate ()
 Request an xforms-revalidate.
void requestRefresh ()
 Request an xforms-refresh.
void forceRebind (in nsIXFormsControl control)
 Force rebinding (and refreshing) of a control.
nsISchemaType getTypeForNode (in nsIDOMNode node)
 Determine the type for a form control based on the schema included by this model.
nsISchemaType getTypeForControl (in nsIXFormsControl control)
 Determine the type for a form control based on the schema included by this model.
AString getBuiltinTypeNameForControl (in nsIXFormsControl control)
 Return builtin type name for a form control based on the schema included by this model.
void getTypeAndNSFromNode (in nsIDOMNode instancenode, out AString type, out AString namespaceURI)
 This function takes an instance data node, finds the type bound to it, and returns the separated out type and namespace URI.
void getDerivedTypeList (in AString aType, in AString aNamespace, out AString aTypeList)
 Retrieves the list of datatypes that the original type is derived from or is an extension of.
void GetRootBuiltinType (in nsISchemaType aType, out unsigned short aBuiltinType)
 Retrieves the primative builtin type that the original type derives from.
nsIDOMDocument getInstanceDocument (in DOMString instanceID)
void rebuild ()
void recalculate ()
void revalidate ()
void refresh ()

Public Attributes

const unsigned short SUBMIT_SERIALIZE_NODE = 1
const unsigned short SUBMIT_SKIP_NODE = 2
const unsigned short SUBMIT_ABORT_SUBMISSION = 3
readonly attribute boolean lazyAuthored
 This attribute is set when the model's instance was lazy authored.
readonly attribute boolean isReady
 This attribute is set when the model handled xforms-ready event.
readonly attribute boolean hasDOMContentFired
 Returns true when the model has been notified that the DOMContentLoaded event has been fired on the XForms document.

Detailed Description

Private interface implemented by the model element for other elements to use.

Definition at line 52 of file nsIModelElementPrivate.idl.


Member Function Documentation

Called by form control elements when they are bound to or unbound from this model.

These form controls will be refreshed when refresh() is called on the model.

Add an instance element to the model's instance list.

Parameters:
aInstanceElementThe instance element to add to the list

Locate the instance element child with the given id.

Force rebinding (and refreshing) of a control.

Also handles rebinding and refreshing of child controls, if necessary.

Parameters:
controlThe control to rebind.

Return builtin type name for a form control based on the schema included by this model.

void nsIModelElementPrivate::getDerivedTypeList ( in AString  aType,
in AString  aNamespace,
out AString  aTypeList 
)

Retrieves the list of datatypes that the original type is derived from or is an extension of.

Parameters:
aTypeThe original type
aNamespaceThe original namespace URI
aTypeListThe returned space-delimited list

Returns NS_ERROR_XFORMS_UNION_TYPE if a schema union datatype was encounterd while trying to build the type list. Will also return an error if we encounter a complex type that comes from complex content extension or restriction.

nsIDOMDocument nsIXFormsModelElement::getInstanceDocument ( in DOMString  instanceID) [inherited]
void nsIModelElementPrivate::GetRootBuiltinType ( in nsISchemaType  aType,
out unsigned short  aBuiltinType 
)

Retrieves the primative builtin type that the original type derives from.

Parameters:
aTypeThe original type
aBuiltinTypeThe returned builtin type (defined in nsISchema)

Returns NS_ERROR_XFORMS_UNION_TYPE if a schema union datatype was encounterd while trying to build the type list. Will also return an error if we encounter a complex type that comes from complex content extension or restriction.

void nsIModelElementPrivate::getTypeAndNSFromNode ( in nsIDOMNode  instancenode,
out AString  type,
out AString  namespaceURI 
)

This function takes an instance data node, finds the type bound to it, and returns the separated out type and namespace URI.

If no type is set for the node, then it returns the defaults: "http://www.w3.org/2001/XMLSchema" and "string"

Determine the type for a form control based on the schema included by this model.

Determine the type for a form control based on the schema included by this model.

void nsIModelElementPrivate::getTypeFromNode ( in nsIDOMNode  aInstanceData,
out AString  aType,
out AString  aNSUri 
)

Retrieves the type for an instance data node.

Parameters:
aInstanceDataThe instance data node
aTypeThe type of the node
aNSURIThe namespace of the type
unsigned short nsIModelElementPrivate::handleInstanceDataNode ( in nsIDOMNode  aInstanceDataNode)

Handles an instance data node and returns one of the above 3 values.

Notification that an instance element has started or finished loading its instance data.

Model construction cannot complete until all of the instances have loaded their data.

The 'uri' parameter for instanceLoadFinished is the uri of or on the instance element and is needed to add the uri to the context info if the link fails.

Notification that all of the external message loads have finished loading.

Model contstruction cannot complete until all of the external messages have loaded their data.

Remove an instance element from the model's instance list.

Parameters:
aInstanceElementThe instance element to remove from the list

Request an xforms-rebuild.

If a previous request (of this or one of the 3 following events) is already being handled, the event will be queued, and sent after that. If multiple events are queued, they will be dispatched FIFO order.

Request an xforms-recalculate.

Request an xforms-refresh.

Request an xforms-revalidate.

Insert a set of nodes underneath an instance node.

If doRebuild is true, the function will request xforms-rebuild, xforms-recalculate, xforms-revalidate, and xforms-refresh to be dispatched to the model.

Parameters:
nodeThe instance node
contentNode that holds the contents to insert under the instance node
doRebuildRequest rebuild event sequence
void nsIModelElementPrivate::setNodeValue ( in nsIDOMNode  instanceNode,
in AString  nodeValue,
in boolean  doRefresh,
out boolean  nodeChanged 
)

Set the value of an instance node.

If doRefresh is true, the function will request xforms-recalculate, xforms-revalidate, and xforms-refresh to be dispatched to the model.

Parameters:
instanceNodeThe node to set the value for
nodeValueThe value to set
doRefreshRequest value-changed event sequence
nodeChangedReturn whether the node was actually changed

Set MIP states for given control bound to the given bound node.

Parameters:
aControlThe control
aBoundNodeThe node the control is bound to

Validates the instance node against the schemas loaded by the model.


Member Data Documentation

Returns true when the model has been notified that the DOMContentLoaded event has been fired on the XForms document.

Definition at line 199 of file nsIModelElementPrivate.idl.

This attribute is set when the model handled xforms-ready event.

Definition at line 152 of file nsIModelElementPrivate.idl.

This attribute is set when the model's instance was lazy authored.

Definition at line 147 of file nsIModelElementPrivate.idl.

Definition at line 118 of file nsIModelElementPrivate.idl.

Definition at line 116 of file nsIModelElementPrivate.idl.

Definition at line 117 of file nsIModelElementPrivate.idl.


The documentation for this interface was generated from the following file: