[CLOSED] AjaxRequestException.Handler parameters

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] AjaxRequestException.Handler parameters

    Hi all

    I have AjaxRequestException.Handler defined on my Resource Manager but I want s different behavior for session expired event.
    What parameters I can pass on with a function that is a handler for this event please?
    So I can figure out what message am I getting as an exception and can act accordingly.

    Thank you
    Last edited by Daniil; May 22, 2015 at 8:46 AM. Reason: [CLOSED]
  2. #2
    Hi @registrator,

    If you run this example, choose ResourceManager and AjaxRequestException in the respective ComboBoxes, you'll see a set of parameters.
    https://examples2.ext.net/#/Events/Listeners/Arguments
  3. #3
    Wow, cool example. Thank you for pointing it out!
  4. #4
    Can you please help me defining the function for handling this?

    I got this:

        @Html.X().ResourceManager().ShowWarningOnAjaxFailure(false).AjaxTimeout(30000).Listeners(l => l.AjaxRequestException.Fn = "ajaxException(response, result, el, eventType, action, extraParams, o)")
    var ajaxException = function (response, result, el, eventType, action, extraParams, o) {
    
        Ext.Msg.alert('Application Error', 'Sorry, an error happened while processing your request. We apologize for the inconvenience!');
        return false;
    };
    In the browser I get: Response not defined and then I remove response and get Result not defined so I think I am doing something very wrong here.

    Thank you
  5. #5
    Please try:
    l.AjaxRequestException.Fn = "ajaxException"
    The Fn property's value should be just a function name.
  6. #6
    Thank you for the answer Daniil.
    When I define this like you suggest, the function is called on every page load even if there is no exception and all the parameters passed in are undefined.

Similar Threads

  1. Replies: 6
    Last Post: Sep 24, 2013, 6:55 AM
  2. [CLOSED] Hide AjaxRequestException Window
    By Tactem in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 12, 2012, 1:21 PM
  3. Replies: 1
    Last Post: Sep 28, 2011, 3:50 AM
  4. groupcommand handler parameters
    By wp_joju in forum 1.x Help
    Replies: 4
    Last Post: Feb 16, 2011, 9:22 AM
  5. [CLOSED] Button AJAX Event and Handler Parameters
    By amitpareek in forum 1.x Help
    Replies: 3
    Last Post: Sep 17, 2008, 6:48 PM

Posting Permissions