2004-10-13 09:51:52 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla XForms support.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* IBM Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 2004
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
* Brian Ryner <bryner@brianryner.com>
|
2005-06-26 18:30:17 +00:00
|
|
|
* Olli Pettay <Olli.Pettay@helsinki.fi>
|
2004-10-13 09:51:52 +00:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#ifndef nsXFormsModelElement_h_
|
|
|
|
#define nsXFormsModelElement_h_
|
|
|
|
|
2004-11-04 00:24:40 +00:00
|
|
|
#include "nsXFormsStubElement.h"
|
2004-10-26 00:34:03 +00:00
|
|
|
#include "nsIModelElementPrivate.h"
|
2005-10-25 17:29:56 +00:00
|
|
|
#include "nsIXFormsNSModelElement.h"
|
2004-12-15 19:46:10 +00:00
|
|
|
#include "nsIDOMEventListener.h"
|
2004-10-13 09:51:52 +00:00
|
|
|
#include "nsISchema.h"
|
|
|
|
#include "nsCOMArray.h"
|
|
|
|
#include "nsVoidArray.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIDOMDocument.h"
|
2005-10-25 17:29:56 +00:00
|
|
|
#include "nsIDOMNodeList.h"
|
2004-11-13 00:22:30 +00:00
|
|
|
#include "nsXFormsMDGEngine.h"
|
2005-05-05 07:09:40 +00:00
|
|
|
#include "nsXFormsUtils.h"
|
2005-10-25 17:29:56 +00:00
|
|
|
#include "nsIClassInfo.h"
|
2004-10-13 09:51:52 +00:00
|
|
|
|
|
|
|
#include "nsISchemaLoader.h"
|
|
|
|
#include "nsISchema.h"
|
2005-06-20 19:08:46 +00:00
|
|
|
#include "nsIXFormsContextControl.h"
|
2004-10-13 09:51:52 +00:00
|
|
|
|
|
|
|
class nsIDOMElement;
|
|
|
|
class nsIDOMNode;
|
2005-01-27 23:02:27 +00:00
|
|
|
class nsIXFormsXPathEvaluator;
|
2004-11-13 00:22:30 +00:00
|
|
|
class nsIDOMXPathResult;
|
2004-10-13 09:51:52 +00:00
|
|
|
class nsXFormsControl;
|
2005-10-25 17:29:56 +00:00
|
|
|
class nsXFormsModelInstanceDocuments;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of the instance node list returned by
|
|
|
|
* nsIXFormsModel::getInstanceDocuments.
|
|
|
|
*
|
|
|
|
* Manages the list of all instance elements that belong to a given
|
|
|
|
* nsXFormsModelElement.
|
|
|
|
*/
|
|
|
|
class nsXFormsModelInstanceDocuments : public nsIDOMNodeList,
|
|
|
|
public nsIClassInfo
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsXFormsModelInstanceDocuments();
|
|
|
|
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSICLASSINFO
|
|
|
|
NS_DECL_NSIDOMNODELIST
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add an instance element
|
|
|
|
*
|
|
|
|
* @param aInstance The new instance element
|
|
|
|
*/
|
|
|
|
void AddInstance(nsIInstanceElementPrivate *aInstance);
|
|
|
|
|
2006-02-08 11:03:27 +00:00
|
|
|
/**
|
|
|
|
* Remove an instance element
|
|
|
|
*
|
|
|
|
* @param aInstance The instance element
|
|
|
|
*/
|
|
|
|
void RemoveInstance(nsIInstanceElementPrivate *aInstance);
|
|
|
|
|
2005-10-25 17:29:56 +00:00
|
|
|
/**
|
|
|
|
* Get the instance document at a given index
|
|
|
|
*
|
|
|
|
* @note Does NOT addref the returned element!
|
|
|
|
*
|
|
|
|
* @param aIndex The index
|
|
|
|
* @return The instance element (or nsnull if not found)
|
|
|
|
*/
|
|
|
|
nsIInstanceElementPrivate* GetInstanceAt(PRUint32 aIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Instructs the class to drop references to all instance elements
|
|
|
|
*/
|
|
|
|
void DropReferences();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/** The array holding the instance elements */
|
|
|
|
nsCOMArray<nsIInstanceElementPrivate> mInstanceList;
|
|
|
|
};
|
2004-10-13 09:51:52 +00:00
|
|
|
|
2006-03-29 10:49:28 +00:00
|
|
|
/**
|
|
|
|
* A class for storing pointers to XForms controls added to an XForms
|
|
|
|
* model. Organized as a tree, with pointers to first child and next sibling.
|
|
|
|
*
|
|
|
|
* Notes:
|
|
|
|
* 1) The root node is special; only has children and a nsnull mNode.
|
|
|
|
* 2) All functions operate on the node they are called on, and its
|
|
|
|
* subtree. Functions will never go up (as in: nearer the root) in the tree.
|
|
|
|
*/
|
|
|
|
class nsXFormsControlListItem
|
|
|
|
{
|
|
|
|
/** The XForms control itself */
|
|
|
|
nsCOMPtr<nsIXFormsControl> mNode;
|
|
|
|
|
|
|
|
/** The next sibling of the node */
|
|
|
|
nsXFormsControlListItem *mNextSibling;
|
|
|
|
|
|
|
|
/** The first child of the node */
|
|
|
|
nsXFormsControlListItem *mFirstChild;
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsXFormsControlListItem(nsIXFormsControl* aControl);
|
|
|
|
~nsXFormsControlListItem();
|
|
|
|
nsXFormsControlListItem(const nsXFormsControlListItem& aCopy);
|
|
|
|
|
|
|
|
/** Clear contents of current node, all siblings, and all children */
|
|
|
|
void Clear();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove a control from the current (sub-) tree. Will search from that node
|
|
|
|
* and down in the tree for the node.
|
|
|
|
*
|
|
|
|
* @param aControl The control to remove
|
|
|
|
* @param aRemoved Was the control found and removed?
|
|
|
|
*/
|
|
|
|
nsresult RemoveControl(nsIXFormsControl *aControl, PRBool &aRemoved);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add a control to the (sub-) tree as a child to the given |aParent|. If
|
|
|
|
* there is no |aParent|, it will insert it as a sibling to |this|. If
|
|
|
|
* |aParent| is not found, it will bail.
|
|
|
|
*
|
|
|
|
* @param aControl The control to insert
|
|
|
|
* @param aParent The (eventual) parent to insert it under
|
|
|
|
*/
|
|
|
|
nsresult AddControl(nsIXFormsControl *aControl,
|
|
|
|
nsIXFormsControl *aParent);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Find a control in the (sub-) tree.
|
|
|
|
*
|
|
|
|
* @param aControl The control to find
|
|
|
|
*/
|
|
|
|
nsXFormsControlListItem* FindControl(nsIXFormsControl *aControl);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the nsIXFormsControl that this node contains.
|
|
|
|
*/
|
|
|
|
already_AddRefed<nsIXFormsControl> Control();
|
|
|
|
|
|
|
|
/** Return the first child of the node */
|
|
|
|
nsXFormsControlListItem* FirstChild() { return mFirstChild; };
|
|
|
|
|
|
|
|
/** Return the next sibling of the node */
|
|
|
|
nsXFormsControlListItem* NextSibling() { return mNextSibling; };
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An iterator implementation for the class.
|
|
|
|
*/
|
|
|
|
class iterator
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
/** The control the iterator is currently pointing at */
|
|
|
|
nsXFormsControlListItem *mCur;
|
|
|
|
|
|
|
|
/** A stack of non-visited nodes */
|
|
|
|
nsVoidArray mStack;
|
|
|
|
|
|
|
|
public:
|
|
|
|
iterator();
|
|
|
|
iterator(const nsXFormsControlListItem::iterator&);
|
|
|
|
iterator operator=(nsXFormsControlListItem*);
|
|
|
|
bool operator!=(const nsXFormsControlListItem*);
|
|
|
|
iterator operator++();
|
|
|
|
nsXFormsControlListItem* operator*();
|
|
|
|
};
|
|
|
|
|
|
|
|
/** The begining position for the node (itself) */
|
|
|
|
nsXFormsControlListItem* begin();
|
|
|
|
|
|
|
|
/** The end position for the node (nsnull) */
|
|
|
|
nsXFormsControlListItem* end();
|
|
|
|
};
|
|
|
|
|
2004-11-04 21:12:22 +00:00
|
|
|
/**
|
|
|
|
* Implementation of the XForms \<model\> element.
|
|
|
|
*
|
|
|
|
* This includes all of the code for loading the model's external resources and
|
|
|
|
* initializing the model and its controls.
|
|
|
|
*
|
|
|
|
* @see http://www.w3.org/TR/xforms/slice3.html#structure-model
|
|
|
|
*/
|
2004-11-04 00:24:40 +00:00
|
|
|
class nsXFormsModelElement : public nsXFormsStubElement,
|
2004-10-26 00:34:03 +00:00
|
|
|
public nsIModelElementPrivate,
|
2005-10-25 17:29:56 +00:00
|
|
|
public nsIXFormsNSModelElement,
|
2004-10-13 09:51:52 +00:00
|
|
|
public nsISchemaLoadListener,
|
2005-06-20 19:08:46 +00:00
|
|
|
public nsIDOMEventListener,
|
|
|
|
public nsIXFormsContextControl
|
2004-10-13 09:51:52 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsXFormsModelElement() NS_HIDDEN;
|
|
|
|
|
2004-11-04 00:24:40 +00:00
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
2004-10-13 09:51:52 +00:00
|
|
|
NS_DECL_NSIXFORMSMODELELEMENT
|
2004-10-26 00:34:03 +00:00
|
|
|
NS_DECL_NSIMODELELEMENTPRIVATE
|
2005-10-25 17:29:56 +00:00
|
|
|
NS_DECL_NSIXFORMSNSMODELELEMENT
|
2004-10-13 09:51:52 +00:00
|
|
|
NS_DECL_NSISCHEMALOADLISTENER
|
|
|
|
NS_DECL_NSIWEBSERVICEERRORHANDLER
|
|
|
|
NS_DECL_NSIDOMEVENTLISTENER
|
2005-06-20 19:08:46 +00:00
|
|
|
NS_DECL_NSIXFORMSCONTEXTCONTROL
|
2004-10-13 09:51:52 +00:00
|
|
|
|
2004-11-04 00:24:40 +00:00
|
|
|
// nsIXTFGenericElement overrides
|
|
|
|
NS_IMETHOD OnDestroyed();
|
|
|
|
NS_IMETHOD GetScriptingInterfaces(PRUint32 *aCount, nsIID ***aArray);
|
|
|
|
NS_IMETHOD WillChangeDocument(nsIDOMDocument *aNewDocument);
|
|
|
|
NS_IMETHOD DocumentChanged(nsIDOMDocument *aNewDocument);
|
|
|
|
NS_IMETHOD DoneAddingChildren();
|
|
|
|
NS_IMETHOD HandleDefault(nsIDOMEvent *aEvent, PRBool *aHandled);
|
|
|
|
NS_IMETHOD OnCreated(nsIXTFGenericElementWrapper *aWrapper);
|
|
|
|
|
2005-06-21 16:47:29 +00:00
|
|
|
// nsIXFormsControlBase overrides
|
|
|
|
NS_IMETHOD Bind() {
|
|
|
|
// dummy method, so does nothing
|
|
|
|
return NS_OK;
|
|
|
|
};
|
|
|
|
|
2004-10-13 09:51:52 +00:00
|
|
|
// Called after nsXFormsAtoms is registered
|
|
|
|
static NS_HIDDEN_(void) Startup();
|
|
|
|
|
2005-05-17 11:30:43 +00:00
|
|
|
/**
|
|
|
|
* The models are not ready for binding, so defer the binding of the control
|
|
|
|
* by storing it as a property on the document. The models will run through
|
|
|
|
* this list when they are ready for binding.
|
|
|
|
*
|
|
|
|
* @param aDoc Document that contains aElement
|
|
|
|
* @param aControl XForms control waiting to be bound
|
|
|
|
*/
|
|
|
|
static NS_HIDDEN_(nsresult) DeferElementBind(nsIDOMDocument *aDoc,
|
2005-06-21 16:47:29 +00:00
|
|
|
nsIXFormsControlBase *aControl);
|
2005-05-17 11:30:43 +00:00
|
|
|
|
2005-06-26 18:30:17 +00:00
|
|
|
static nsresult NeedsPostRefresh(nsIXFormsControl* aControl);
|
|
|
|
static void CancelPostRefresh(nsIXFormsControl* aControl);
|
2004-10-13 09:51:52 +00:00
|
|
|
private:
|
2004-10-26 00:34:03 +00:00
|
|
|
|
|
|
|
NS_HIDDEN_(already_AddRefed<nsIDOMDocument>)
|
|
|
|
FindInstanceDocument(const nsAString &aID);
|
2005-01-31 23:56:27 +00:00
|
|
|
NS_HIDDEN_(void) Reset();
|
|
|
|
NS_HIDDEN_(void) BackupOrRestoreInstanceData(PRBool restore);
|
2004-10-26 00:34:03 +00:00
|
|
|
|
2005-02-01 16:02:54 +00:00
|
|
|
/** Initializes the MIPs on all form controls */
|
2005-05-05 07:09:40 +00:00
|
|
|
NS_HIDDEN_(nsresult) InitializeControls();
|
2005-02-01 16:02:54 +00:00
|
|
|
|
2005-10-28 18:52:56 +00:00
|
|
|
NS_HIDDEN_(nsresult) InitializeInstances();
|
|
|
|
|
2005-01-31 23:41:00 +00:00
|
|
|
NS_HIDDEN_(nsresult) ProcessBindElements();
|
2004-10-13 09:51:52 +00:00
|
|
|
NS_HIDDEN_(nsresult) FinishConstruction();
|
2005-02-01 16:02:54 +00:00
|
|
|
NS_HIDDEN_(nsresult) ConstructDone();
|
2004-12-15 19:46:10 +00:00
|
|
|
NS_HIDDEN_(void) MaybeNotifyCompletion();
|
2004-10-26 00:34:03 +00:00
|
|
|
|
2005-05-05 07:09:40 +00:00
|
|
|
NS_HIDDEN_(nsresult) ProcessBind(nsIXFormsXPathEvaluator *aEvaluator,
|
2005-01-27 23:02:27 +00:00
|
|
|
nsIDOMNode *aContextNode,
|
2005-05-05 07:09:40 +00:00
|
|
|
PRInt32 aContextPosition,
|
|
|
|
PRInt32 aContextSize,
|
2006-02-23 11:25:07 +00:00
|
|
|
nsIDOMElement *aBindElement,
|
|
|
|
PRBool aIsOuter = PR_FALSE);
|
2004-10-13 09:51:52 +00:00
|
|
|
|
|
|
|
NS_HIDDEN_(void) RemoveModelFromDocument();
|
|
|
|
|
2005-01-19 16:05:31 +00:00
|
|
|
/**
|
2005-05-05 07:09:40 +00:00
|
|
|
* Set the states on the control |aControl| bound to the instance data node
|
|
|
|
* |aNode|. It dispatches the necessary events and sets the pseudo class
|
|
|
|
* states. |aAllStates| determines whether all states should be set, or only
|
|
|
|
* changed.
|
2005-02-01 16:02:54 +00:00
|
|
|
*
|
|
|
|
* @param aControl The event target
|
|
|
|
* @param aNode The instance node
|
2005-05-05 07:09:40 +00:00
|
|
|
* @param aAllStates Set all states (PR_TRUE), or only changed
|
2005-01-19 16:05:31 +00:00
|
|
|
*/
|
2005-05-05 07:09:40 +00:00
|
|
|
NS_HIDDEN_(nsresult) SetStatesInternal(nsIXFormsControl *aControl,
|
|
|
|
nsIDOMNode *aNode,
|
2006-03-15 09:18:06 +00:00
|
|
|
PRBool aDispatchEvents = PR_TRUE);
|
2005-05-05 07:09:40 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the state of a specific state.
|
|
|
|
*
|
|
|
|
* @param aElement The element to dispatch events to and set states on
|
|
|
|
* @param aState The state value
|
|
|
|
* @param aOnEvent The on event for the state.
|
|
|
|
*/
|
|
|
|
NS_HIDDEN_(void) SetSingleState(nsIDOMElement *aElement,
|
|
|
|
PRBool aState,
|
2005-10-19 07:39:36 +00:00
|
|
|
nsXFormsEvent aOnEvent);
|
2005-01-19 16:05:31 +00:00
|
|
|
|
2005-05-17 11:30:43 +00:00
|
|
|
/**
|
|
|
|
* Call the Bind() and Refresh() on controls which was deferred because
|
|
|
|
* the model was not ready.
|
|
|
|
*
|
|
|
|
* @param aDoc Document that contains the XForms control
|
|
|
|
*/
|
|
|
|
static NS_HIDDEN_(void) ProcessDeferredBinds(nsIDOMDocument *aDoc);
|
|
|
|
|
2004-12-15 19:46:10 +00:00
|
|
|
// Returns true when all external documents have been loaded
|
2004-11-10 23:24:23 +00:00
|
|
|
PRBool IsComplete() const { return (mSchemaTotal == mSchemaCount
|
2004-10-13 09:51:52 +00:00
|
|
|
&& mPendingInstanceCount == 0); }
|
|
|
|
|
2005-12-13 21:19:58 +00:00
|
|
|
/**
|
|
|
|
* Called by HandleEvent. Event handler for the 'DOMContentLoaded' event.
|
|
|
|
*/
|
|
|
|
NS_HIDDEN_(nsresult) HandleLoad(nsIDOMEvent *aEvent);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called by HandleEvent. Event handler for the 'unload' event.
|
|
|
|
*/
|
|
|
|
NS_HIDDEN_(nsresult) HandleUnload(nsIDOMEvent *aEvent);
|
|
|
|
|
2006-03-29 10:49:28 +00:00
|
|
|
NS_HIDDEN_(nsresult) RefreshSubTree(nsXFormsControlListItem *aCurrent,
|
|
|
|
PRBool aForceRebind);
|
|
|
|
|
2004-11-10 23:24:23 +00:00
|
|
|
nsIDOMElement *mElement;
|
|
|
|
nsCOMPtr<nsISchemaLoader> mSchemas;
|
2004-12-15 19:46:10 +00:00
|
|
|
nsStringArray mPendingInlineSchemas;
|
2006-03-29 10:49:28 +00:00
|
|
|
nsXFormsControlListItem mFormControls;
|
2004-10-13 09:51:52 +00:00
|
|
|
|
|
|
|
PRInt32 mSchemaCount;
|
2004-11-10 23:24:23 +00:00
|
|
|
PRInt32 mSchemaTotal;
|
2004-10-13 09:51:52 +00:00
|
|
|
PRInt32 mPendingInstanceCount;
|
2004-12-15 19:46:10 +00:00
|
|
|
|
2005-01-19 16:05:31 +00:00
|
|
|
/** The MDG for this model */
|
2004-11-13 00:22:30 +00:00
|
|
|
nsXFormsMDGEngine mMDG;
|
2004-12-15 19:46:10 +00:00
|
|
|
|
2005-02-01 20:23:41 +00:00
|
|
|
/**
|
|
|
|
* List of changed nodes, ie. nodes that have not been informed about
|
|
|
|
* changes yet
|
|
|
|
*/
|
2005-02-24 14:35:27 +00:00
|
|
|
nsCOMArray<nsIDOMNode> mChangedNodes;
|
2005-01-19 16:05:31 +00:00
|
|
|
|
2004-12-15 19:46:10 +00:00
|
|
|
// This flag indicates whether or not the document fired DOMContentLoaded
|
|
|
|
PRBool mDocumentLoaded;
|
2005-04-15 09:44:06 +00:00
|
|
|
|
|
|
|
// This flag indicates whether a xforms-rebuild has been called, but no
|
|
|
|
// xforms-revalidate yet
|
|
|
|
PRBool mNeedsRefresh;
|
2005-06-29 18:14:43 +00:00
|
|
|
|
2005-10-28 18:52:56 +00:00
|
|
|
// This flag indicates whether instance elements have been initialized
|
|
|
|
PRBool mInstancesInitialized;
|
|
|
|
|
2006-02-08 11:03:27 +00:00
|
|
|
/**
|
2006-03-22 18:05:49 +00:00
|
|
|
* Indicates whether the model has handled the xforms-ready event
|
2006-02-08 11:03:27 +00:00
|
|
|
*/
|
|
|
|
PRBool mReadyHandled;
|
|
|
|
|
2005-06-29 18:14:43 +00:00
|
|
|
/**
|
2005-10-25 17:29:56 +00:00
|
|
|
* All instance documents contained by this model, including lazy-authored
|
|
|
|
* instance documents.
|
2005-06-29 18:14:43 +00:00
|
|
|
*/
|
2005-10-25 17:29:56 +00:00
|
|
|
nsRefPtr<nsXFormsModelInstanceDocuments> mInstanceDocuments;
|
2005-06-29 18:14:43 +00:00
|
|
|
|
2006-02-08 11:03:27 +00:00
|
|
|
// Indicates whether the model's instance was built by lazy authoring
|
2005-06-29 18:14:43 +00:00
|
|
|
PRBool mLazyModel;
|
2006-02-17 10:14:10 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Type information for nodes, with their type set through \<xforms:bind\>.
|
|
|
|
*
|
|
|
|
* @see http://www.w3.org/TR/xforms/slice6.html#model-prop-type
|
|
|
|
*/
|
|
|
|
nsClassHashtable<nsISupportsHashKey, nsString> mNodeToType;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* P3P type information for nodes, with their type set through
|
|
|
|
* \<xforms:bind\>.
|
|
|
|
|
|
|
|
* @see http://www.w3.org/TR/xforms/slice6.html#model-prop-p3ptype
|
|
|
|
*/
|
|
|
|
nsClassHashtable<nsISupportsHashKey, nsString> mNodeToP3PType;
|
2006-03-22 18:05:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates whether the model has handled the xforms-model-construct-done
|
|
|
|
* event
|
|
|
|
*/
|
|
|
|
PRBool mConstructDoneHandled;
|
2004-10-13 09:51:52 +00:00
|
|
|
};
|
|
|
|
|
2005-06-26 18:30:17 +00:00
|
|
|
/**
|
|
|
|
* nsPostRefresh is needed by the UI Controls, which are implemented in
|
|
|
|
* XBL and used inside \<repeat\>. It is needed to refresh the controls,
|
|
|
|
* because XBL bindings are attached to XForms controls *after* refreshing
|
|
|
|
* the \<repeat\>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class nsPostRefresh {
|
|
|
|
public:
|
|
|
|
nsPostRefresh();
|
|
|
|
~nsPostRefresh();
|
2005-08-03 18:43:45 +00:00
|
|
|
static const nsVoidArray* PostRefreshList();
|
2005-06-26 18:30:17 +00:00
|
|
|
};
|
|
|
|
|
2004-10-13 09:51:52 +00:00
|
|
|
NS_HIDDEN_(nsresult) NS_NewXFormsModelElement(nsIXTFElement **aResult);
|
|
|
|
|
|
|
|
#endif
|