Results 1 to 2 of 2

Thread: [CLOSED]baseParams in designer

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2009
    Posts
    57
    Vote Rating
    0
      0  

    Default [CLOSED]baseParams in designer

    When we create a baseParams value and want to include a dynamic field, it will not allow a second '.' in the field without creating code as follows:

    Code:
    farmStore = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            farmStore.superclass.constructor.call(this, Ext.apply({
                storeId: 'farmStore',
                url: 'vvcall.pgm',
                root: 'MLPFARM',
                baseParams: '{  pgm:\'MLPBRFLCRT\',\naction:\'getFarms\',\ncomp:ext.getCmp(\'Company\').getValue(),\nloc:Ext.getCmp(\'Location\').getValue()}',
                fields: [
                    {
                        name: 'FMFARMNO'
                    },
                    {
                        name: 'FMNAME'
                    }
                ]
            }, cfg));
        }
    });
    new farmStore();
    The whole array for the baseParams gets put into a quoted structure instead of this:
    Code:
    farmStore = Ext.extend(Ext.data.JsonStore, {
        constructor: function(cfg) {
            cfg = cfg || {};
            farmStore.superclass.constructor.call(this, Ext.apply({
                storeId: 'farmStore',
                url: 'vvcall.pgm',
                root: 'MLPFARM',
                baseParams: {  
                    pgm:'MLPBRFLCRT',
                    action:'getFarms',
                    comp:ext.getCmp('Company').getValue(),
                    loc:Ext.getCmp('Location').getValue()
                },
                fields: [
                    {
                        name: 'FMFARMNO'
                    },
                    {
                        name: 'FMNAME'
                    }
                ]
            }, cfg));
        }
    });
    new farmStore();
    When we put in just action and pgm it works fine. When we add comp it works fine, until you add the ".getValue()". if you leave the "." off of getValue(), it also works fine. Is this a bug or am I missing something obvious?

  2. #2
    Sencha User jarrednicholls's Avatar
    Join Date
    Mar 2007
    Location
    Frederick, MD
    Posts
    1,747
    Vote Rating
    7
      0  

    Default

    Hi toole1,

    Unfortunately putting dynamic code into an object configuration is not likely to work. If the code fails to evaluate, then it is stringified so that your components will continue to operate in the Canvas/Design area. Only static values can go into these properties for now, and you can augment your baseParams dynamically in your implementation code as needed.

Posting Permissions

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