Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:11:55+00:00 2026-06-08T21:11:55+00:00

I want to write a listener that will listen to all network requests errors,

  • 0

I want to write a listener that will listen to all network requests errors, something like this :

Ext.Ajax.on('requestexception', function(conn, response, options) {
    if (response.status === 555) {
        Ext.Msg.alert('test', 'test');
    }
});

The above code works only for requests via Ext.Ajax.request(), how to rewrite it so it could work also for form submits, url not found error etc.

On server side I have Spring MVC that dispatches all requests and if there is any error, the response status of 555 is returned.

form.submit({
     url: dispatcher.getUrl('savePlanRequest'),
     //headers: {'Content-Type':'multipart/form-data; accept-charset=utf-8'},
     scope: this,
     method: 'GET',
     params: {
         scan: scan_id,
         attachments: attachments_id,
         parcels: parcels_id
     },
     success: function(form, action) {
         this.fireEvent('plansaved', this);
         Ext.Msg.alert(i18n.getMsg('success'), i18n.getMsg('gsip.view.plans.NewPlanForm.success_info'))
     },
     failure: function(form, action) {
         console.log('failure');
         //Ext.Msg.alert(i18n.getMsg('failure'), action.result.msg);
     }
 });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:11:56+00:00Added an answer on June 8, 2026 at 9:11 pm

    This should work:

    Ext.override( Ext.form.action.Submit, { 
        handleResponse : function( response ) {
    
            var form = this.form,
                errorReader = form.errorReader,
                rs, errors, i, len, records;
    
            if (errorReader) {
                 rs = errorReader.read(response);
                 success = rs.success;
                 // Do something if success is false
            }
    
            this.callParent ( arguments ); 
        }
    });
    

    Have a look at the source code for the exact handleResponse() method from which I copied most of the code above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem: I want to write a process that will allow a user to take
I want to write a background program that will monitor the _changes feed of
I want write a simple query which will fetch data from a table (which
I want to write a program in Prolog that confirms if a b-tree of
I've a text field which extends javax.swing.JTextField and also have document listener like this
I am attempting to write a service, that will every X minutes attempt to
I have a Spring JMS listener that receives a BytesMessage/JMSBytesMessage. I want to convert
I want to write a component that monitors other activities, but it's listeners are
I'm trying to write an application that manipulates camera data. I would like to
I want write a little code analyzer which parses nested structures and translates into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.