-
21 Oct 2012 10:49 PM #1
ExtDirect.Resource always failed to load
ExtDirect.Resource always failed to load
I am trying to get Ext.Direct running inside SA.
ExtDirect itself works, but how should this be done inside SA?!?
My API is always rejected (load failure).
I tested it with JSON and JavaScript Notation:
Code:{- "url": "/edr_router",
- "type": "remoting",
- "actions": {
- "CL_EXT_MODEL": [
- {
- "name": "CUSTOMER",
- "len": 1
- {
- "name": "CUSTOMER_PAV",
- "len": 1
- {
- "name": "INTER_REDEFO_LOAD_001",
- "len": 1
- {
- "CL_EXT_MODEL": [
none of them worked for me.I also had some issues to get it running the right way using Ext.Loader. The store always throwed some errors, because ExtDirect API was loaded to late to be used for ExtDirectFn.My only solution was to hardcode API and constructor and launch method:Code:Ext.app.REMOTING_API ={ "url":"/edr_router", "type":"remoting", "actions":{ "CL_EXT_MODEL":[ { "name":"CUSTOMER", "len":1 }, { "name":"CUSTOMER_PAV", "len":1 }, { "name":"INTER_REDEFO_LOAD_001", "len":1 }, { "name":"INTER_REDEFO_LOAD_002", "len":1 }, { "name":"INTER_REDEFO_LOAD_PAV_001", "len":1 }, { "name":"INTER_REDEFO_SAVE_001", "len":1 }, { "name":"INTER_REDEFO_SAVE_002", "len":1 }, { "name":"INTER_REDEFO_SAVE_PAV_001", "len":1 }, { "name":"MATERIAL", "len":1 }, { "name":"PRINT", "len":1 }, { "name":"SEARCHHELP", "len":1 }] }};was is the prefered, working way to do this?Code:... launch: function() { Ext.direct.Manager.addProvider(Ext.app.REMOTING_API = { type: 'remoting', url: 'edr_router', actions: { "ZCL_EXT_MODEL": [{ "name": "A8500_MARGIN_CALCULATION_NEW", "len": 1 }] } //namespace: 'Veka' }); var directStore = Ext.create('Veka.store.BwDirectStore', { proxy: { directFn: ZCL_EXT_MODEL.A8500_MARGIN_CALCULATION_NEW, extraParams: { //CUSTOMER: '', //MATERIAL: '', FISCYEAR: '2010', FISCPER_FROM: '1', FISCPER_TO: '12' } } }); directStore.load(); var grid = Ext.create('Veka.view.BwGrid', { fullscreen: true }); var titleBar = Ext.getCmp('gridTitleBar'); titleBar.setTitle(titleBar.getTitle() + ' (' + SYS_UNAME + ')'); }
Cheers Holger
-
22 Oct 2012 10:07 AM #2
Holger -
There was a bug with Direct not taking the urlPrefix into account properly that has recently been fixed. I have a feeling this should fix your issue and will be out in the next patch. Please let us know if it doesn't. For now what you have above looks like it will work just fine.Aaron Conran
@aconran
Sencha Architect Development Team
-
22 Oct 2012 10:09 AM #3
For reference our bug number is DSGNR-2405.
Aaron Conran
@aconran
Sencha Architect Development Team
-
22 Nov 2012 6:02 AM #4
Hi Aaron,
i just testet 2.1.0.676 concerning ext direct, but is is not working!
Code:Using a JSON string config i got error "Ext Direct Remote Specification failed to load". Using a JavaScript based configuration, i got a popup dialog telling "An error ocurred" You're trying to decode an invalid JSON String: Ext.app.REMOTING_API ={ "url":"/edr_router", "type":"remoting", "actions":{ "CL_EXT_MODEL":[ { "name":"CUSTOMER", "len":1 }, { "name":"CUSTOMER_PAV", "len":1 }, { "name":"INTER_REDEFO_LOAD_001", "len":1 }, { "name":"INTER_REDEFO_LOAD_002", "len":1 }, { "name":"INTER_REDEFO_LOAD_PAV_001", "len":1 }, { "name":"INTER_REDEFO_SAVE_001", "len":1 }, { "name":"INTER_REDEFO_SAVE_002", "len":1 }, { "name":"INTER_REDEFO_SAVE_PAV_001", "len":1 }, { "name":"MATERIAL", "len":1 }, { "name":"PRINT", "len":1 }, { "name":"SEARCHHELP", "len":1 }] } }; Source Class: Ext.JSON Source Method: decode
Any help how to get ExtDirect working.
Ext Direct works in my Sencha Designer 1.0 i am currently using for a productive Szenario.
What are the issues? Why do i can't use Direct in Architect 2.0.
Release Cycles on bugs are very long!
Cheers Holger
-
26 Nov 2012 7:53 AM #5
What server side stack are you using? Is it abiding by the format=json param? It looks like its returning JavaScript instead of JSON and we're trying to decode it as JSON.
Aaron Conran
@aconran
Sencha Architect Development Team
-
26 Nov 2012 8:25 AM #6
It is a custom implementation inside a SAP Application Server. I wrote an ext direct implementation that support api uri with javaScript and JSON Format. Our Solution works in Sencha Architect 1.0 (which i am using currently in productive SAP Solutions).
Using URI: http://fo50.eaton.de/edr_api?CONF=JSON
I returnContent-Type : application/json; charset=utf-8
and the following content:
I am also able to generate JavaScript API including code, usingCode:{- "url": "/edr_router",
- "type": "remoting",
- "actions": {
- "CL_EXT_MODEL": [
- {
- "name": "CUSTOMER",
- "len": 1
- {
- "name": "CUSTOMER_PAV",
- "len": 1
- {
- "name": "INTER_REDEFO_LOAD_001",
- "len": 1
- {
- "name": "INTER_REDEFO_LOAD_002",
- "len": 1
- {
- "name": "INTER_REDEFO_LOAD_PAV_001",
- "len": 1
- {
- "name": "INTER_REDEFO_SAVE_001",
- "len": 1
- {
- "name": "INTER_REDEFO_SAVE_002",
- "len": 1
- {
- "name": "INTER_REDEFO_SAVE_PAV_001",
- "len": 1
- {
- "name": "MATERIAL",
- "len": 1
- {
- "name": "PRINT",
- "len": 1
- {
- "name": "SEARCHHELP",
- "len": 1
- {
- "CL_EXT_MODEL": [
URI: http://fo50.eaton.de/edr_api?CONF=JS
and
Content-Type: application/javascript; charset=utf-8
Please can you tell me what did you exactly need from Web Server.
I think, the above JSON Object is valid and also the content type (or am i wrong).
Currently i am using an uri for testing that is not inside app domain (fully qualified).
Cheers Holger
Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.


Reply With Quote