Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Touch Premium Member
    Join Date
    Jun 2008
    Location
    Germany, Dortmund
    Posts
    249
    Vote Rating
    13
    hschaefer123 will become famous soon enough

      0  

    Default 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
          }
        ]
      }
    }
    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       }]  }};
    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:
    ...    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 + ')');
        }
    was is the prefered, working way to do this?

    Cheers Holger

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,363
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    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

  3. #3
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,363
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    For reference our bug number is DSGNR-2405.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  4. #4
    Touch Premium Member
    Join Date
    Jun 2008
    Location
    Germany, Dortmund
    Posts
    249
    Vote Rating
    13
    hschaefer123 will become famous soon enough

      0  

    Default


    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

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,363
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    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

  6. #6
    Touch Premium Member
    Join Date
    Jun 2008
    Location
    Germany, Dortmund
    Posts
    249
    Vote Rating
    13
    hschaefer123 will become famous soon enough

      0  

    Default


    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 return
    Content-Type : application/json; charset=utf-8

    and the following content:

    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
          },
        • {
          • "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
          }
        ]
      }
    }
    I am also able to generate JavaScript API including code, using
    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

Thread Participants: 1