-
16 Aug 2012 6:07 AM #1
Form api : No URL specified when loading
Form api : No URL specified when loading
Hi all,
I have an issue with 4.1 everytime I try tu use Ext.Direct Form Api.
The issue in trace is :
I seems that the api Url are not registered.Code:[E] Ext.data.Connection.setOptions(): No URL specified
Could anyone help me on this ?
Is there a difference between define and create on those settings ?
Here's my form :
Here's my load callCode:Ext.define( 'MINE.view.attribute.admin.attributes.Form', { extend : 'Ext.form.Panel', xtype : 'mine-view-attribute-admin-attributes-form', id : 'mine-view-attribute-admin-attributes-form-id', defaultType : 'textfield', paramsAsHash : true, bodyPadding : 5, border : true, disabled : true, items : [ { xtype: 'textfield', name: 'name', fieldLabel: __('Name'), allowBlank: false } ], buttons : [ { iconCls: 'icon-save', tooltip: __('Click here to save updates'), text: __('Update') } ], api: { // The server-side method to call for load() requests load: eav.attributeRetrieve, // The server-side must mark the submit handler as a 'formHandler' submit: eav.attributeUpdate } } );
Code:loadAdminAttributeForm: function(view, record, html, index, e, eOpts) { Ext.getCmp('pim-view-attribute-admin-attributes-form-id').load({ params: { id: record.raw.id } }); }
-
17 Aug 2012 8:27 AM #2
Tchinkatchuk,
Does your server provide router URL in Ext.Direct API declaration?
Regards,
Alex.
-
20 Aug 2012 6:33 AM #3
Hu !
Yes, my methods are presents and declared as
..."attribute":{"name":"update","len":1,"formHandler":true}...
Strange. I really do not understand what's wrong
-
20 Aug 2012 9:20 AM #4
Besides the methods, there should be at least two additional properties:
Check that your server declares router URL.Code:Ext.app.REMOTING_API = { actions: { ... }, url: "/foo", type: "remoting" }
Regards,
Alex.
-
21 Aug 2012 6:41 AM #5
This is the code I have but no clue. still bugged
I have :
Code:Ext.app.EXTDIRECT_API = { "url":"\/extdirect.php\/dsExtDirect\/router", "type":"remoting", "actions":{ .."attribute":{"name":"update","len":1,"formHandler":true}... } };
-
21 Aug 2012 6:55 AM #6
Strangely, it orks if I declare the api like this :
I do not think it is the good way. Does someone know anything about it ?Code:constructor: function (config) { Ext.applyIf(config, { // defaults for configs that should be passed along to the Basic form constructor go here api: { submit: category.update } }); this.callParent(arguments); },
-
25 Aug 2012 1:35 PM #7
Only that you are not alone:
http://stackoverflow.com/questions/1...ing-ext-direct
I got this because the remote API did not specify the method as a form handler.


Reply With Quote