-
1 Mar 2012 3:40 AM #1
Ext.form.Panel doesn't allow to defined a api object
Ext.form.Panel doesn't allow to defined a api object
It should be possible to define an api object like this:
currently Ext Designer generates:Code:api: { load: SomeStub.load, submit:SomeStub.submit }
Tested on Mac OS X Lion with Ext Designer 2.0 build 298Code:api: '{ load: SomeStub.load, submit:SomeStub.submit }'
best regards
RolandRoland Schütz
Senior Software Architect
---
Bancha Project - Seamless integrate CakePHP with ExtJS and Sencha Touch
-
1 Mar 2012 8:51 AM #2
Hi Roland,
We recently opened a ticket for this DSGNR-1393. This should be resolved in the coming weeks.
ThanksBharat Nagwani
Sencha Designer Development Team
-
4 Mar 2012 11:23 AM #3
If someone else is also using Ext Designer with FormPanels and API, here's a override which makes the Designer code work proper (for build 298):
Code:// just change the following line var className = 'MyApp.view.ui.CommentForm'; // you don't have to care about this Ext.require([className], function() { var classObj = Ext.ClassManager.get(className), classPrototype = classObj.prototype, fixApiConfig = function(api) { if(Ext.isString(api)) { var stringToObject = new Function("return "+api); return stringToObject(); } else { return api; } }; // Ext Designer defines the api two times, so we need to // overwrite two times as well Ext.define(className+'Overrride', { override: className, // override the designer config api: fixApiConfig(classPrototype.api), // override the designer initComponent config constructor : function(config) { if(!config.api) { config.api = fixApiConfig(classPrototype.api); } this.callParent([config]); } }); });Roland Schütz
Senior Software Architect
---
Bancha Project - Seamless integrate CakePHP with ExtJS and Sencha Touch
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote