4 May 2011 1:34 PM #51
Are there any plans to make this compatible with Ext4?
25 May 2011 7:53 PM #52
What do I need to set count_only_required_params to, so that optional parameters are optional?
26 May 2011 1:25 AM #53
I've been extremely far far away from this forum for several months. But now I'm here!
@Andrew Peacock: Thank you very much for the support!
@walldorff: Yes, ExtDirect::provide() needs to be the last call. The only documentation we currently have is this thread... specially the first posts. Take a look!
@tiagoadp & JorisA: I have not used ExtJs 4 yet. Isn't it compatible? Have someone tried? Which are the errors? Anyway, it sounds like a good idea to make it ExtJs 4 compatible, if it isn't. Just added to my "to do" list.
@hschaefer123: State Provider integration? Sounds very nice! I'm sorry I have not taken the time to take care of your request yet.
@padawan & hschaefer123: Thanks! Every praise really motivates us!
@ttbgwt: Your request is so old now... are you still interested? The answer would go beyond the strict scope of this Ext.Direct integration.
This post (http://www.sencha.com/forum/showthre...l=1#post480214) teaches how apply configurations (I know you read it, I am linking for the others...)
All configurations must come before the "ExtDirect::provide" call:
ExtDirect::$configuration_name = $value;
ExtDirect::$count_only_required_params = true;
function calculate_something( $needed, $optional = 9 )
And this is all.
Now, ExtJS requires you to make the remote function call with the number of parameters declared in the "len" property. In other words: there is no such things as "optional parameters" in the client-side, because of the way ExtJS Direct is designed.
In the example, you need to choose: it will be either "1" or "2" parameters. You simply can't choose "1" and optionally "2", at the ExtJS side. Makes sense?
Last edited by j.bruni; 26 May 2011 at 1:29 AM. Reason: corrections
29 May 2011 1:21 AM #54
Guess I should have bothered to try before I ask, so far it's been working great with Ext4, haven't run into any problems yet
By the way, what about supporting custom events like these:
I think the ability to allow hooking into direct calls or even complete batches could make user or rights checking a lot easier.
30 May 2011 8:28 AM #55
At the server-side, I use the authorization_function configuration to grant or deny the execution of the request.
ExtDirect::$authorization_function = 'authorize';
function authorize( string $class, string $method )
if ( user_is_allowed_to_perform_this_action( $class . '::' . $method ) )
30 May 2011 8:45 AM #56
Firing custom events from server-side
ExtDirect::$transform_response = 'transform_response';
function transform_response( $action, $response )
// Types of the parameters received by this function:
// $action - ExtDirectAction
// $response - array
if ( $some_condition )
$response['type'] = 'event';
$response['name'] = 'trace';
$response['where'] = 'Where this YYYY happen';
$response['trace'] = 'Some data';
// return modified response
15 Jun 2011 1:03 PM #57
I really love this implementation of Ext Direct. Thanks for all of the work you have put into this. I noticed on the video about 6 months ago they said that Ext.Direct allowed for long running processes to be specified separately so that they return on their own time. Is there a way to do this with the current implementation? I have a dashboard with several things loading, and some of the reports take about 7-10 seconds, so i want those to return on their own time, and not hold up the rest of the batch.
16 Jun 2011 3:33 AM #58
Separating long running process calls
1) Create two distinct remote providers. One of them would handle the long running processes only. The other one would handle the other processes. To do this, you need to create two PHP files, one for each API. In this case, you need to include both files using the <script> tag. Calls to one provider do not get mixed with the calls to the other provider.
2) Set enableBuffer to false. See Ext.Direct.RemotingProvider documentation. This setting allows / disallows to send multiple method calls in a single request. If you set it to false, each method will be called through its separated HTTP request. You may want to mix this idea with the previous one, by setting enableBuffer to false only to the long running processes provider, and leaving the default value to the other provider.
Problem is... you don't have a way to change enableBuffer value with the current implementation.
Solution is... we can implement it.
Below line #41 (static public $id = '';), add:
* @var boolean|integer Ext.Direct Provider attribute "enableBuffer"
static public $enableBuffer = 10;
$api_array = array(
'id' => self::$id,
'url' => ( empty( self::$url ) ? $_SERVER['PHP_SELF'] : self::$url ),
'type' => 'remoting',
'namespace' => self::$namespace,
'descriptor' => self::$descriptor,
'enableBuffer' => self::$enableBuffer
ExtDirect::$enableBuffer = false;
I hope this helps... What do you think?
16 Jun 2011 6:28 AM #59
Thanks for the quick reply. I think that this will work. I am still trying to decide whether to use the enableBuffer on my set of long running ones (they are all connecting to our exchange server to pull data) because they all return at the same time, so i may just do two different providers. One for our database driven reports, and one for exchange server. However, knowing the option to set the enable buffer will come in handy later if someone desires a very complex report on the dashboard.
23 Jun 2011 9:48 AM #60
Happy Birthday, Extremely Easy!
Today is "Extremely Easy Ext.Direct integration with PHP" birthday!
This thread was opened exactly one year ago, in June 23rd, 2010.
Thanks everybody for the comments, questions, reports, suggestions, praises, support.
Thanks also to the whole ExtJS team, past, present and future.
And I also want to thank the open source software community.
And, why not? Thanks to my father, mother, wife, kids, pets, nature and God.
By TommyMaintz in forum Ext.DirectReplies: 37Last Post: 11 Feb 2015, 12:46 AM
By ckr in forum Ext.DirectReplies: 34Last Post: 11 Jun 2012, 1:30 PM
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: 37
- padawan (1 Post)
- JorisA (2 Posts)
- netsuo (4 Posts)
- zoq (1 Post)
- grgur (1 Post)
- Blob (1 Post)
- firstname.lastname@example.org (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)
- predator (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)