XForms Bug 293597 - itemset does not work with external instance. r=smaug/aaronr a=mkaply

git-svn-id: svn://10.0.0.236/trunk@174943 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
doronr%us.ibm.com
2005-06-21 16:47:29 +00:00
parent 431f5eb303
commit 77943145c8
14 changed files with 167 additions and 57 deletions

View File

@@ -70,7 +70,6 @@
#include "nsXFormsUtils.h"
#include "nsXFormsSchemaValidator.h"
#include "nsIAttribute.h"
#include "nsISchemaLoader.h"
#include "nsISchema.h"
#include "nsAutoPtr.h"
@@ -1565,7 +1564,7 @@ DeleteBindList(void *aObject,
/* static */ nsresult
nsXFormsModelElement::DeferElementBind(nsIDOMDocument *aDoc,
nsIXFormsControl *aControl)
nsIXFormsControlBase *aControl)
{
nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
@@ -1573,12 +1572,12 @@ nsXFormsModelElement::DeferElementBind(nsIDOMDocument *aDoc,
return NS_ERROR_FAILURE;
}
nsCOMArray<nsIXFormsControl> *deferredBindList =
NS_STATIC_CAST(nsCOMArray<nsIXFormsControl> *,
nsCOMArray<nsIXFormsControlBase> *deferredBindList =
NS_STATIC_CAST(nsCOMArray<nsIXFormsControlBase> *,
doc->GetProperty(nsXFormsAtoms::deferredBindListProperty));
if (!deferredBindList) {
deferredBindList = new nsCOMArray<nsIXFormsControl>(16);
deferredBindList = new nsCOMArray<nsIXFormsControlBase>(16);
NS_ENSURE_TRUE(deferredBindList, NS_ERROR_OUT_OF_MEMORY);
doc->SetProperty(nsXFormsAtoms::deferredBindListProperty, deferredBindList,
@@ -1605,16 +1604,16 @@ nsXFormsModelElement::ProcessDeferredBinds(nsIDOMDocument *aDoc)
doc->SetProperty(nsXFormsAtoms::readyForBindProperty, doc);
nsCOMArray<nsIXFormsControl> *deferredBindList =
NS_STATIC_CAST(nsCOMArray<nsIXFormsControl> *,
nsCOMArray<nsIXFormsControlBase> *deferredBindList =
NS_STATIC_CAST(nsCOMArray<nsIXFormsControlBase> *,
doc->GetProperty(nsXFormsAtoms::deferredBindListProperty));
if (deferredBindList) {
for (int i = 0; i < deferredBindList->Count(); ++i) {
nsIXFormsControl *control = deferredBindList->ObjectAt(i);
if (control) {
control->Bind();
control->Refresh();
nsIXFormsControlBase *base = deferredBindList->ObjectAt(i);
if (base) {
base->Bind();
base->Refresh();
}
}