-
2 Jun 2011 7:28 AM #1
[CLOSED]baseParams in designer
[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:
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\',\naction:\'getFarms\',\ncomp:ext.getCmp(\'Company\').getValue(),\nloc: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?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();
-
3 Jun 2011 5:47 AM #2Sencha - Desktop Packager Dev Team
- Join Date
- Mar 2007
- Location
- Baltimore, MD.
- Posts
- 1,745
- Vote Rating
- 6
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.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote