Results 1 to 5 of 5

Thread: SharePoint WebService XML Response and ExtJs XMLReader

  1. #1
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277

    Default SharePoint WebService XML Response and ExtJs XMLReader

    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-\*]+)/'

    Modified
    'tagTokenRe=/^(#)?((?:z:)?[\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?

  2. #2
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    135

    Default

    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:

    Code:
    Ext.class-to-be-extended.override({
    	method-to-be-overriten: function(parameters){
    		...
    		tagTokenRe=/^(#)?((?:z:)?[\w-\*]+)/;
    		...
    	}
    });
    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.

    Razvan
    Last edited by razvanioan; 12 Aug 2010 at 8:04 AM. Reason: forgot about parameters of the method (if any)

  3. #3
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277

    Default

    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?

  4. #4
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277

    Default

    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?

  5. #5
    Sencha User razvanioan's Avatar
    Join Date
    Feb 2008
    Location
    Romania
    Posts
    135

    Default

    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.

Similar Threads

  1. ExtJS and sharepoint
    By prachikulkarni in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 29 Oct 2012, 8:51 AM
  2. ExtJs kill SharePoint 2010
    By Kostia in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 12 Aug 2010, 6:27 AM
  3. How to read nested xml elements using xmlReader in extjs file?
    By Apeksha in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 31 May 2010, 11:55 PM
  4. .NET Webservice response to a TreeLoader
    By Chau in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 4 Mar 2010, 12:16 PM
  5. Extracting xml data from a webservice with XmlReader
    By LuisVielva in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 19 Dec 2007, 2:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •