Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Sep 2007
    Location
    Pennsyvania, USA
    Posts
    232
    Vote Rating
    0
    fzammetti is on a distinguished road

      0  

    Default [CLOSED][3.x] SERIOUS v3 breakage

    [CLOSED][3.x] SERIOUS v3 breakage


    Hi folks... we did our daily v3 SVN updates today and experienced a very serious (for us) breakage.

    We use DWR here, so we're using a DWR proxy (pretty much what you can find posted in the forums in the past, with some relatively minor changes for our needs). The issue, simply-stated, is that our DWR calls are never going through, nor are events firing on the proxy. Here's the proxy code:

    Code:
    Ext.namespace("Ext.ux");
    
    Ext.ux.DWRDataProxy = function(inConfig){
      Ext.apply(this, inConfig);
      Ext.ux.DWRDataProxy.superclass.constructor.call(this);
    };
    
    Ext.extend(Ext.ux.DWRDataProxy, Ext.data.DataProxy, {
    
        dwrFunction : null,
        loadArgsKey : "dwrFunctionArgs",
        
        load : function(inParams, inReader, inCallback, inScope, inArgs) {
            var dataProxy = this;
            if (dataProxy.fireEvent("beforeload", dataProxy, inArgs) !== false) {
                var loadArgs = inArgs[this.loadArgsKey] || inArgs; 
                var dwrFunctionArgs = []; 
                if (loadArgs instanceof Array) {
                    for (var i = 0; i < loadArgs.length; i++) {
                        dwrFunctionArgs.push(loadArgs[i]);
                    }
                } else { 
                    for (var loadArgName in loadArgs) {
                        dwrFunctionArgs.push(loadArgs[loadArgName]);
                    }
                }
                dwrFunctionArgs.push({
                    callback :  function(inResponse) {
                        var records = inReader.readRecords(inResponse);
                        dataProxy.fireEvent("load", dataProxy, inResponse, inCallback);
                        inCallback.call(inScope, records, inArgs, true);
                    },
                    exceptionHandler : function(inMessage, inException) {
                        dataProxy.fireEvent("loadexception", dataProxy, inMessage, 
                          inCallback, inException);
                        inCallback.call(inScope, null, inArgs, false);
                    }
                });
                this.dwrFunction.apply(Object, dwrFunctionArgs); 
            } else { 
                callback.call(inScope || this, null, inArgs, false);
            }
        }
        
    });
    And here's a DataStore using this proxy:

    Code:
    wiView.tabA.itemsStore = new Ext.data.Store({
      proxy : new Ext.ux.DWRDataProxy({
        dwrFunction : Delegate.getItems,
        listeners : {
          beforeload : function(inDataProxy, inParams) {
            inParams[inDataProxy.loadArgsKey] = [wiView.param1]; 
            return true;
          },
          load : function(inStore, inRecords, inOptions) {
            wiView.tabA.dataLoaded = true;
            Ext.getCmp("tabA").setTitle(
              "Number of items: " + inRecords.length);
          },
          loadexception : function(inProxy, inMessage, inCallback, inException) {
            Ext.MessageBox.show({
              animEl : "divSource", buttons : Ext.MessageBox.OK,
              title : "error", msg : "error"
            });
          }      
        }
      }),
      reader : 
        new Ext.data.ArrayReader({}, wi.ItemRecord)
    });
    This store is bound to a Grid. Before this morning's v3 updates, this all worked 100%, and the code hasn't been changed recently. I've done some debugging and I can see that the beforeload event fires, but that's it... one that handler finishes, load in the proxy never gets called, nor does load in the store.

    Is anyone aware of any v3 changes that might account for this? This is a major blocker for us at the moment so I'm hoping to get some kind of answer ASAP.

    Thanks,
    Frank

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,164
    Vote Rating
    674
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Since it's usong server code it's hard to say, do you have an online example?
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2007
    Location
    Pennsyvania, USA
    Posts
    232
    Vote Rating
    0
    fzammetti is on a distinguished road

      0  

    Default


    Sorry, I don't, and I don't think there's any quick and easy way I could throw something together, if for no other reason than I have no place to host it.

    Maybe the simple question to ask though is this: what could cause neither of the load events to fire? Because, at the end of the day, that's the basic problem. The GridPanel is a tab on a TabPanel, and when I flip to the tab I can see the loading mask appear, and as I said, I can see the beforeload event firing, but that's it, nothing beyond that. Can you think of anything that might cause that? I'll take wild-a** guesses at the moment

    I'm going to have to revert the latest changes shortly if I can't otherwise come up with an answer, and I'm really hesitant to do, so shots in the dark are welcome at this point.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Frank -

    This is due to a change in the Ext.data.Proxy code. The load method has been removed in favor of doRequest. Instead of implementing load you will want to implement doRequest. This is to support the new enhanced writer support that has been added to the Ext.data package. We will look into providing a fix at the Ext.data.DataProxy level so that load is backwards compatible.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    6
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    I noticed that all of the posts to the server are tagged with "xaction". I was wondering if that would cause some people problems.

  6. #6
    Ext JS Premium Member
    Join Date
    Sep 2007
    Location
    Pennsyvania, USA
    Posts
    232
    Vote Rating
    0
    fzammetti is on a distinguished road

      0  

    Default


    Thanks Aaron... at first it didn't work, but then I looked at ScriptTagProxy and noticed you guys simply did:

    doRequest : function(action, rs, params, reader, writer, cb, scope, arg) {
    this.load(params, reader, cb, scope, arg);
    }

    Once I added that to my DWRProxy code everything worked... initially I tried to change load to doRequest and modify the argument list, but I must have botched something and made it seem like your answer was wrong, but in fact it was completely correct, so thanks very much

Thread Participants: 3