You found a bug! We've classified it as a bug in our system. We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Ext User oddy's Avatar
    Join Date
    Jun 2009
    Posts
    53
    Vote Rating
    0
    oddy is on a distinguished road

      0  

    Default [TENT][3.0rc2] JsonStore exception event

    [TENT][3.0rc2] JsonStore exception event


    JsonStore does not fire exception event with success == false in a response json, even though I had specified successProperty for it explicitly as "success".
    Is it a known issue, or should I post a bugreport?

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

      0  

    Default


    There is no known issue. I have used it today with success in fact. If you make a post in the bugs thread you are making a bug report, so go ahead and provide a complete report as per:
    http://extjs.com/forum/showthread.php?t=71015

  3. #3
    Ext User oddy's Avatar
    Join Date
    Jun 2009
    Posts
    53
    Vote Rating
    0
    oddy is on a distinguished road

      0  

    Default


    Quote Originally Posted by mjlecomte View Post
    There is no known issue. I have used it today with success in fact. If you make a post in the bugs thread you are making a bug report, so go ahead and provide a complete report as per:
    http://extjs.com/forum/showthread.php?t=71015
    Thanks, I know the rules. Actually my first two posts were well-formed bugreports. I just don't want to write lot of description text which could be then marked as "duplicate". Hope you can understand human laziness. In fact I think you do - you have a developer from Australia

    Anyway. The problem is, I think, in a documentation (or wrong implementation):

    Ext version tested:
    1. 3.0 rc2
    Browser versions tested against:
    1. Firefox 3.1 (firebug 1.3.3 installed)
    Operating System:
    1. Vista x64
    Description:
    1. Open http://extjs.com/deploy/ext-3.0-rc2/docs/
    2. Open JsonStore API
    3. public events -> "exception" -> "type" parameter:
      • "response" : An invalid response from the server was returned: either 404, 500 or the response meta-data does not match that defined in the DataReader (eg: root, idProperty, successProperty).
      • "remote" : A valid response was returned from the server having successProperty === false. This response might contain an error-message sent from the server. For example, the user may have failed authentication/authorization or a database validation error occurred.
    4. Set JsonStore with this configuration options:
      Code:
                      new Ext.data.JsonStore({
                          root            : "records",
                          totalProperty   : "totalRecords",
                          idProperty      : "id",
                          successProperty : "success",
                          remoteSort      : true,
                          fields          : [
                              {name: "firstName"},
                              {name: "lastName"}
                          ],
                          // Set here url
                          listeners: {
                              exception: function(proxy, type, action, o, response, args){
                                  if (type == "remote") {
                                      Ext.MessageBox.alert("Error", response.errors.reason);
                                  } else {
                                      Ext.MessageBox.alert("Warning", "Cannot load data");
                                  }
                              }
                          }
                      });
    5. Now let your JsonStore to load something like {errors: {reason: "Exception during loading"}, success: false}
    6. You'll get "response" type insted of expected remote. Response object'll show you 200 OK.
    7. See screenshots.
    Attached Images

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

      0  

    Default


    I'm unable to reproduce that behavior.

    I modified the examples/writer/writer.html to output to the console upon exception event for further inspection (it already shows a message box).

    I also had my own separate test case which does not reproduce the behavior you describe.

    If you can compose a complete working showcase that reproduces this behavior, including server response I could test further.

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

      0  

    Default


    Code from writer.js:
    Code:
    // Typical Store collecting the Proxy, Reader and Writer together.
    var store = new Ext.data.Store({
        id: 'user',
        proxy: proxy,
        reader: reader,
        writer: writer,  // <-- plug a DataWriter into the store just as you would a Reader
        autoSave: true,  // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
        listeners: {
            write : function(store, action, result, res, rs) {
                App.setAlert(res.success, res.message); // <-- show user-feedback for all write actions
            },
            exception : function(proxy, type, action, options, res, arg) {
                console.warn(arguments);
                if (type === 'remote') {
                    Ext.Msg.show({
                        title: 'REMOTE EXCEPTION',
                        msg: res.message,
                        icon: Ext.MessageBox.ERROR
                    });
                }
            }
        }
    });

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

      0  

    Default


    Response as seen from firebug
    Attached Images

  7. #7
    Ext User oddy's Avatar
    Join Date
    Jun 2009
    Posts
    53
    Vote Rating
    0
    oddy is on a distinguished road

      0  

    Default


    Ok, I'll try to setup a publicly visible resource for Ext issues I have met. And, until then, here's one more (detailed) screenshot
    Attached Images
    Last edited by oddy; 29 Jun 2009 at 3:22 AM. Reason: added detailed image

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

      0  

    Default


    Looks to me like you have a root is undefined message.

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

      0  

    Default


    You stated the code to produce the store. You're just missing the server response so someone could test what you've got going.

  10. #10
    Ext User oddy's Avatar
    Join Date
    Jun 2009
    Posts
    53
    Vote Rating
    0
    oddy is on a distinguished road

      0  

    Default


    So then, to get a "remote" type error I also need to return a root property?
    It sounds a bit strange.
    Me: "Hey server, GET me some data!"
    Server: "Sorry, buddy, I have some errors. The reason I have them is [...] so success = false. Oh yeah, I forgot. Here's your empty root node"

    There is no point to return empty root node in an "error" object.

    So it's either a documentational bug (I haven't seen this requirement in API) or it's a bug in implementation. Or (I can't let this reason go from my head) it's something system-specific if you cannot reproduce the bug.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi