19 Jul 2010 6:49 PM #31
Ext.util.TaskRunner() You can use that to start a task that calls an arbitrary callback every interval. It's hard to give you a more detailed response without knowing more about what you are trying to poll and when you should start and when you should end. you can use your callback on the executeHooks to register a polling task with the task runner
20 Jul 2010 3:31 PM #32
Ah! Thanks Trii. I'd kind of glossed over that, misinterpreting what it was. But yes, that looks like it'll do the trick!
Thanks again for all your help,
2 Aug 2010 3:19 AM #33
I'm using this ExtDirect integration a lot and I found something that I want to change. If you setup a DirectStore with the "api" parameters (code below), "baseParams" are received server-side in one object, not multiples parameters.
DirectStore (incomplete code):
this.store = new Ext.data.DirectStore(
read : Ext.php.get.Store,
create : Ext.php.set.StoreCreate,
update : Ext.php.set.StoreUpdate,
destroy : Ext.php.del.Store
$database_table = $datas->databaseTable;
$idField = $datas->idField;
function Store($databaseTable,$displayField,$valueField,$idField, $returnAllFields)
StephaneHi from Switzerland !
5 Aug 2010 7:22 PM #34
Since I didn't see anything in the .zip file itself, what license is this code released under?
12 Aug 2010 7:10 AM #35
All I can tell is that what I currently think about the code license is something like:
1. You are free to do anything you want with it.
2. You are responsible for the consequences of the code usage (meaning: the author is not responsible if you misuse, or use it in an unsafe manner, etc.)
3. I will be happy if you don't remove the "author" comment in the code.
Hmmm... maybe I should add these words as a "license.txt" in the zip?
12 Aug 2010 9:43 AM #36
New Version Available
New Version Available
A new version has been released today.
Just go to post #1 of this thread, and the new ZIP file is there.
Five new configuration options were added, four of them of callback type: "declare_method_function", "authorization_function", "transform_result_function", and "transform_response_function"
Now, you are able to specify an "authorization_function", where you can check the user permissions and return true or false accordingly, allowing the API call or not.
With the "transform_result_function", you can modify the result of the API method call after its execution, but before it is sent to the client-side.
Finally, with the "transform_response_function", you can modify the response structure. This allows to fire server-side events, and to send extra server side data together with the RPC result.
I am too busy to write detailed instructions about the new features.
Here is some sample code:
// New configuration option
ExtDirect::$id = 'my_api';
// All "function" configurations accept parameters of callback type
ExtDirect::$transform_result_function = 'transform_result';
ExtDirect::$transform_response_function = 'transform_response';
ExtDirect::$declare_method_function = 'declare_method';
ExtDirect::$authorization_function = 'authorize';
function transform_result( $action, $result )
if ( $action->form_handler )
$result = array( 'success' => $result );
// return modified result
function transform_response( $action, $response )
$response['error_msg'] = MyFramework::$errors;
$response['success_msg'] = MyFramework::$success;
// return modified response
function declare_method( $class, $method )
$key = $class . '::' . $method;
return in_array( $key, MyFramework::$user->permissions );
// return boolean - declare the method in the API or not
function authorize( $action )
return declare_method( $action->action, $action->method );
// return boolean - authorize the action call or not
// Types of the parameters received by the functions are:
// $action - ExtDirectAction
// $result - array
// $response - array
// $class - string
// $method - string
14 Oct 2010 12:26 PM #37
Excellent Job! This is a great Ext.Direct implementation. Has there been any updates to this since August?
15 Oct 2010 8:00 PM #38
Do you have an example on how to configure and load a DirectStore using your implementation?
26 Oct 2010 9:27 AM #39
26 Oct 2010 9:32 AM #40
Several components data are loaded using DirectStore (treepanel, treegrid, grid, list, etc.) - in the server side, the data source is MySQL (or Memcached).
I do not have a simple/small sample to post, but if you specify more details about what do you want, I may help.
By ckr in forum Ext.DirectReplies: 34Last Post: 11 Jun 2012, 1:30 PM
By TommyMaintz in forum Ext.DirectReplies: 36Last Post: 26 Sep 2011, 12:08 AM
By j.bruni in forum Ext.DirectReplies: 2Last Post: 23 Jun 2010, 11:27 AM
By pkristiana in forum Community DiscussionReplies: 1Last Post: 11 Feb 2010, 1:12 AM
Thread Participants: 36
- padawan (1 Post)
- JorisA (2 Posts)
- netsuo (4 Posts)
- zoq (1 Post)
- grgur (1 Post)
- Blob (1 Post)
- email@example.com (6 Posts)
- walldorff (4 Posts)
- ttbgwt (3 Posts)
- hschaefer123 (1 Post)
- ezkorpyo (1 Post)
- mynsa04 (1 Post)
- azuroff (1 Post)
- AndreKR (1 Post)
- Hacker-CB (1 Post)
- DeFacto (1 Post)
- Max_nl (1 Post)
- aw1zard2 (1 Post)
- salarmehr (1 Post)
- Andrew Peacock (11 Posts)
- tiagoadp (1 Post)
- jessec10 (1 Post)
- Trii (2 Posts)
- stewardsencha (3 Posts)
- Kynao (4 Posts)
- jmefford (2 Posts)
- avishnev (1 Post)
- dschere (1 Post)
- demithron (1 Post)
- lsdriscoll (2 Posts)
- blomasky (1 Post)
- bizsysdev3 (2 Posts)
- cbj4074 (1 Post)
- francois,gelinas5 (1 Post)
- dlbaz (1 Post)