Results 1 to 2 of 2

Thread: AJAX in a constructor?

  1. #1
    Ext User
    Join Date
    Mar 2010
    Location
    Grimsby
    Posts
    10
    Vote Rating
    0
      0  

    Default AJAX in a constructor?

    Just wondering if there is anyway one can use an AJAX call in a constructor function when extending a class. Specifically I am trying to make an extension to the grid class where as part of the constructor function I want to fire off an AJAX request to get some information so I can create a config and then pass that to the superclass constructor.

    I believe this maybe easier done with a factory function but I believe my manager specifically wants it done this way. If it is not possible then I will try other ways.

    Thanks alot.

  2. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Vote Rating
    89
      0  

    Default

    Should work. Just call the superclass constructor in the success callback.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •