1. #1
    Sencha User
    Join Date
    Aug 2008
    Posts
    42
    Vote Rating
    0
    abtrapp is on a distinguished road

      0  

    Question JsonStore autoLoad misunderstanding?

    JsonStore autoLoad misunderstanding?


    Hi!

    I have a typical master / detail combo with a simple store:

    Code:
    var funnyStore = new Ext.data.JsonStore({autoLoad: false, url:...
    a simple master combobox with a listener:

    Code:
    listeners:{
      select: function(combo, value) {
        modelDest = Ext.getCmp('target-combo');
        modelDest.setDisabled(true);
        modelDest.setValue('');
        funnyStore.removeAll();
        funnyStore.reload({params: {facilityId: value.data.facility_id},
          callback: function(){
            modelDest.setDisabled(false);
            ...
    And a target (store: funnyStore).

    The whole thing is working after I visited the target combo once. The first time I focus the target combo it loads the funnyStore without the additional parameters. The funnyStore or the ID of the target combo are nowhere else to be found (renamed them just to check, ...) - so my only idea is, that when it receives the focus the autoLoad: false is ignored.

    Is there any workaround for this (or do I have to jump to every combo after loading a form)?

    Thank you very much in advance!

    Kind regards,
    Anton

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    autoLoad on the Store means that if set to true, when the Store is created it will attempt to load.

    ComboBox with mode set to 'remote' will load the Store when you click on the trigger to see the list.

    If you set mode to 'local' then the ComboBox will assume the Store has been loaded and will not attempt to load the Store. You will have to manage loading at that point.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2008
    Posts
    42
    Vote Rating
    0
    abtrapp is on a distinguished road

      0  

    Default


    THANKS, THANKS, THANKS!!!

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,647
    Vote Rating
    899
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    No problem. When I first started, I hated using ComboBox but things are going to be better and smaller code with ExtJS 4 that is nearing launch.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Aug 2008
    Posts
    42
    Vote Rating
    0
    abtrapp is on a distinguished road

      0  

    Default


    Sounds great!

Similar Threads

  1. JsonStore autoLoad
    By bjd1121 in forum Sencha Touch 1.x: Discussion
    Replies: 1
    Last Post: 18 Aug 2010, 4:33 PM
  2. ListView bindStore misunderstanding
    By ragnaev in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 27 Apr 2010, 10:05 AM
  3. Licensing misunderstanding
    By smokeny in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 17 Feb 2009, 10:02 AM
  4. Need help with GridPanel autoload and JsonStore POST
    By pyro in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 21 May 2008, 1:14 PM
  5. [SOLVED] jsonStore onload problem? (autoLoad: true)
    By SlashEMc2k in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 4 Feb 2008, 1:22 AM

Thread Participants: 1

Tags for this Thread