View Full Version : SharePoint WebService XML Response and ExtJs XMLReader

12 Aug 2010, 6:21 AM
Trying to find a way to load response data from a SharePoint WebService that returns List data with a 'z:' namespace. So each repeating node is 'z:row'.

I found that if I change the Ext.DomQuery variable

Original (ext-all-debug.js Line # 640)
'tagTokenRe = /^(#)?([\w-\*]+)/'


I can specify that 'z:row' is the record for a grid and It will work. However the actual ext-all.js file that is in use is not editable in the environment that I have to work within. Is there a way in my program to override, extend, etc... that variable?

12 Aug 2010, 8:03 AM
You can load another JS file (I'm calling this overrides.js) after ExtJS core files, and before your application file(s), where you can override the class(es) you need:

method-to-be-overriten: function(parameters){

class-to-be-extended is the Ext class that you need to override, and the method-to-be-overriten the function. You have to copy all it's original method code, and change the line you need.

Give it a try.


12 Aug 2010, 9:40 AM
I tried doing something like that however I could never get it to work. Plus the problem as I see it is that the variable is defined as private to the class which is only referenced in the public method. Am I missing something?

13 Aug 2010, 12:40 PM
I have been doing more testing with this. I dont think that its possible to override the DomQuery classs due to the fact that its a singleton and has no prototype. Is this correct?

16 Aug 2010, 12:40 AM
Yes, if it is a singleton, you cannot override it. The only thing you can do, is to change ExtJS code.

You said that you cannot override it on your hosting service...you can put your coppy of ext-all.js in your project and include your copy in your project / application.