jeudi 18 septembre 2014

Upgrading from ExtJS 4.0.7 to 4.2.1 causing TypeError

I have a cloud based query feature which receives xml back from a server. One of the query results returns XML with namespaces, so was considering upgrading from 4.0.7 to 4.2.1 to leverage the namespace feature in 4.2.1.

Upon pointing to the ExtJS 4.2.1 libraries, and not making any code changes, I always receive an error in the JavaScript console of TypeError: ownerContext.bodyContext is null.


I'm using the ext-all-debug-w-comments.js and the error line it is pointing to is in the publishInnerWidth function in the Ext.define of the Ext.Layout.component.body. The particular statement the error is referencing is:


ownerContext.bodyContext.setWidth(innerWidth,!ownerContext.widthModel.natural);


I did not reference the body in ExtJS 4.0.7 and the code did not have any errors, but changing to ExtJS 4.2.1 brings this out.


Again, the reason I'm trying to upgrade is to take advantage of the namespace because the xml I am trying to read contains namespaces in the tags (see below)


<ns2:results>

<ns2:queryId>Some query value</ns2:queryId>

...

</ns2:results>


If anyone can give me an idea how to define my fields for the proxy/store to handle the namespace ns2 in ExtJS 4.0.7, then I will scrap the upgrade.






Upgrading from ExtJS 4.0.7 to 4.2.1 causing TypeError

Aucun commentaire:

Enregistrer un commentaire