Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default Ext Direct stripping Ext.app.POLLING_URLS

    Ext Direct stripping Ext.app.POLLING_URLS


    I could not find the search on the forum, so I apologize if this is a duplicate.

    When using Ext.Direct, the polling API is getting stripped from the api.js file. This is preventing me from using server polling when using Sencha Designer.

    Also, if the API on the server changes, it takes a lot of effort to convince Designer to load the new API. It would be nice if there was an easier way to refresh the Ext Direct API.

    Keep up the great work.

    Thanks!

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Hello,

    1>Could you please explain what you mean by - the polling API is getting stripped from the api.js. Some configs/code etc would help.

    2>Could you also explain what do you have to do when the server api changes? The direct API url in designer loads each time you open the project with a direct API set so you should see the new api in the directFn.

    Thanks
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    The API URL returns this:

    Ext.ns('Ext.app');Ext.app.REMOTING_API = {"actions":{"xpsDesktop":[{"name":"getNoteContent","len":1}]},"type":"remoting","url":"/sp/c/router"};Ext.app.POLLING_URLS = {"getEvents" : "/sp/c/poll/xpsDesktop/getEvents/getEvents"};

    When you look at the source for designer.html, you will see this:
    <script type="text/javascript"> Ext.ns("Ext.app.REMOTING_API"); Ext.app.REMOTING_API = {"descriptor":"Ext.app.REMOTING_API","actions":{"xpsDesktop":[{"name":"getNoteContent","len":1}]},"type":"remoting","url":"http://127.0.0.1:8080/sp/c/router"}; Ext.Direct.addProvider(Ext.app.REMOTING_API); </script>

    Note the missing Ext.app.POLLING_URLS.

    When I add another method on the server, the API URL returns the new content immediately, but the designer.html source stays the same after saving. To get it to update, I have to change the Ext Direct URL by adding a parameter to the query string. This forces designer to reload it. For example, I will change it from http://127.0.0.1:8080/sp/c/api.js to http://127.0.0.1:8080/sp/c/api.js?v=2Thanks!

  4. #4
    Sencha Premium Member
    Join Date
    Oct 2009
    Posts
    104
    Vote Rating
    3
    gatherworks is on a distinguished road

      0  

    Default


    Any update on this? BTW, I am perfectly happy to configure this elsewhere in the app. I just need to know that that is what you want developers to do... It would be nice to have some refresh icon next to the url to force it to reload the api.

    Does it make sense to define all of the ExtDirect api (and polling) in the Application init and not use the Designer to specify the URL? Is there any disadvantage to that approach?

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    1
    bharatn is on a distinguished road

      0  

    Default


    Hi,

    I havent got chance to verify this. We have been bit busy this week. I will verify it and create a bug after confirming. You will see that here once i do that.

    Thanks
    Bharat Nagwani
    Sencha Designer Development Team

Thread Participants: 1