3

My question is to better understand the following answer:

How to handle incoming ajax requests after destroying window?

I am facing the same issue, but don't believe the solutions in the above answer are needed if I am using ExtJS correctly.From my understanding of the destruction phase the last step is to unregister the instance of the componenet from the component manager and clear all the events. If the framework is taking care of this shouldn't the request/callback be cancelled?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Freddy
  • 2,249
  • 1
  • 22
  • 31
  • 2
    Think about situation..... I have a form inside window , that forms takes email ids as input and send email to all email ids on click of 'send' button in window form. When I click on send I don't need to wait to server response because email sending is asynchronous, so I want to close window as soon as user clicks send button , in such case would it be appropriate for framework to discard ajax request ? – csarathe Aug 05 '15 at 12:57

1 Answers1

0

Ajax request should be handled by a controller, not from a view. You can find some informations about MCV in ExtJS here : http://docs.sencha.com/extjs/4.2.1/#!/guide/application_architecture

Christophe Le Besnerais
  • 3,895
  • 3
  • 24
  • 44