Results 1 to 4 of 4

Thread: [docs] Improve description for Ext.appViewModel.setFormulas and .setStores

    You found a bug! We've classified it as EXTJS-20550 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014

    Default [docs] Improve description for Ext.appViewModel.setFormulas and .setStores

    The documentation for and setStores is misleading.

    Given the descriptions in the docs, one could assume that calling setFormulas/setStores would overwrite all formulas/stores in the viewmodel.

    That is not the case however.
    What actually happens is that the existing formulas and stores are replaced only if their key is defined in the object passed to the method (which is probably also the preferred behavior from my POV).
    To verify this for setFormulas see this fiddle. If setFormulas would be overwriting all formulas, then after clicking the "add age formula" button, the fullName formula would have been removed and the name fields would be out of sync.

    This is not only a problem for me: see this thread in which at least 2 other people assumed that those methods would overwrite everything as it was discussed how one could dynamically add new formulas to a viewmodel (without removing the old ones).

    This probably applies to setLinks as well (have not tested that one).

  2. #2


    I've passed your suggestion to the documentation team. Perhaps it can be rewritten to be more clear.

  3. #3


    Thanks for the report! I have opened a bug in our bug tracker.

  4. #4
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014


    I realized there's a downside to the setStores approach for appending stores.
    The getStore method will not work as expected.
    However one can workaround that bevaviour.
    Read more in this post

Similar Threads

  1. ExtJS Docs Icons Description
    By DineshGudikandula in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 22 May 2013, 10:13 AM
  2. [INFOREQ] The Description of Example has an error.
    By ranzj in forum Ext:Bugs
    Replies: 1
    Last Post: 16 May 2013, 1:32 AM
  3. [OPEN-419] Online API docs search Ext JS docs instead of Sencha Touch docs
    By Steffen Hiller in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 13 Oct 2010, 12:10 AM
  4. i want spotlight description
    By shuang in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 30 Jul 2008, 3:23 AM
  5. TextBox with a description
    By thedarklord in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 27 Jul 2008, 5:09 PM

Posting Permissions

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