[CLOSED] Store Proxy Failure event handler definition

  1. #1

    [CLOSED] Store Proxy Failure event handler definition

    I have this store for a combo box.
    .Store(X.Store()
            .ID("AccountComboStore")
            //.AutoLoad(true)
            .Model(
                    X.Model()
                    .Name("BankAccountForCombo")
                    .IDProperty("REF")
                    .Fields(
                        X.ModelField()
                        .Name("NAME")
                        .Type(ModelFieldType.String)
                    )
                )
            .Proxy(Html.X().AjaxProxy()
                .Url(Url.Action("GetBankAccountList", "List", new { area = "lRecord" }))
                .Reader(Html.X().JsonReader().Root("data"))                                                                                     
             )
     ),
    I would like to handle the event of Failure to load the data but could not find how is it defined?

    Thank you
    Last edited by Daniil; Apr 21, 2015 at 12:34 PM. Reason: [CLOSED]
  2. #2
    Hi @registrator,

    There is a successful flag passed to a Store's Load event.
    http://docs.sencha.com/extjs/4.2.1/#...ore-event-load
  3. #3
    Can you get a result back?
    To define something like:

    App.EditWindow.load({
            url: callurl,
            params: {
                id: recordId
            },
            success: function (result) {
                if (result.responseText == '{"success":false,"errorMessage":"Unauthorized","result":"Login"}') {
                    
                };
            }
        });
  4. #4
    In this case it is better to use a Store's Exception handler. A response is passed to its handler.

Similar Threads

  1. Replies: 3
    Last Post: May 06, 2013, 11:52 AM
  2. Replies: 6
    Last Post: Apr 30, 2013, 1:44 PM
  3. [OPEN] [#115] Event definition seem missing
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Jan 04, 2013, 12:23 PM
  4. Grid Panel Store definition
    By ChrisO in forum 2.x Help
    Replies: 0
    Last Post: Jul 13, 2012, 10:49 AM
  5. Replies: 2
    Last Post: Jun 03, 2012, 4:18 PM

Posting Permissions