-
6 Apr 2011 6:59 AM #1
DirectProxy example needed
DirectProxy example needed
I have searched the internet up and down to find an ExtJs DirectProxy example. Even one for 3.x would be great.
I need explanation for instance, how to code the directFn function and what directFn.directCfg.method is.
I got a directFn working, but what are the parameters that I get? One seems to be callback function. What parameters does this need?
There is severe lack of documentation about this, I guess.
Thanks!
-
6 Apr 2011 7:02 AM #2
There are several direct examples in the b1 download. Under /direct
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
6 Apr 2011 7:33 AM #3
Thanks for the pointer. I had searched in examples, but did not find it, because I only searched for "DirectProxy" instead of "type: 'direct'".
In those examples, what is that "TestAction"? I cannot find it declared anywhere.
-
6 Apr 2011 9:14 AM #4
did you looked in examples/direct? Everything is in, TestAction is the direct method in php.
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
7 Apr 2011 1:23 AM #5
Thanks. Got it. I had only looked in the .js files.
I am no php expert. TestAction seems like a server side class that can be remotely called by js, I guess.
But what about directFn.directCfg.method? Or even directCfg? I can't find that in the examples.
-
7 Apr 2011 1:26 AM #6
It's an internal thing, you shouldn't touch it.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
7 Apr 2011 1:36 AM #7
OK, but I get an exception from ExtJs Beta 1 at line 38490 of ext-all-debug.js:
fn.directCfg is undefined.Code:method = fn.directCfg.method;
Code:var getData = function() { console.info('DirectProxy callback!'); console.info(arguments); } var bufferStore = new Ext.data.BufferStore({ id: 'bufferStore', pageSize: 200, model: 'Artikel', remoteSort: true, proxy: { type: 'direct', directFn: getData, model: 'Artikel' } }); [...] bufferStore.guaranteeRange(0, 199);
-
7 Apr 2011 1:38 AM #8
Because you haven't set it up properly. The directFn isn't a regular function, have a look through the examples.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
7 Apr 2011 2:30 AM #9
Hmm, I don't see this special setup. Any more pointers would be greatly appreciated.
-
7 Apr 2011 4:12 AM #10
OK, I finally found this page, which explains some things:
http://www.sencha.com/blog/ext-js-30...-for-everyone/
However, this page (Direct specs) does not exist (anymore):
http://www.sencha.com/products/extjs/direct.php
I am beginning to understand what ExtJs Direct is and I think now, that this does not fit our needs, because we already have a remoting solution: DWR
So, the question is: How can I get a callback from a Ext.data.BufferStore, when it needs data, so that I can call an existing DWR method to fetch the data?
Similar Threads
-
DirectProxy need work
By mitchellsimoens in forum Ext: DiscussionReplies: 35Last Post: 16 Mar 2011, 6:50 AM -
[API] [PR4] DirectProxy missing
By mitchellsimoens in forum Ext:BugsReplies: 2Last Post: 16 Mar 2011, 6:47 AM -
DataWriter Example does not work with DirectProxy
By jcalfee in forum Ext.DirectReplies: 4Last Post: 12 Oct 2010, 12:40 PM -
How to use PARAMS with Ext.data.DirectProxy
By kpopov in forum Ext.DirectReplies: 1Last Post: 10 Sep 2009, 1:44 PM


Reply With Quote