View Full Version : Ext Direct stripping Ext.app.POLLING_URLS

1 Mar 2012, 9:50 AM
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.


1 Mar 2012, 10:39 PM

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.


2 Mar 2012, 12:21 AM
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":""}; 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 to!

7 Mar 2012, 2:21 AM
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?

7 Mar 2012, 6:52 AM

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.