PDA

View Full Version : Some Questions



dawesi
12 May 2009, 5:38 PM
I'm still trying to get my head around why Ext.direct would ever return a textarea?

What's the rationale behind this with Ext.direct?

crp_spaeth
13 May 2009, 3:39 AM
A form can get submitted as well as a normal Direct action.
Since a Form may contains a file to upload to a server and this cant be done via normal xhr a Iframe- bypass is used to simulate an xhr request.

Since an Iframe runs through the parsing engine of the browser a textarea is the only save place where you can put your json stuff in... Ext will than read out the response from the textarea for you.

jay@moduscreate.com
13 May 2009, 3:50 AM
This is how i explain it in Ext JS In Action.

1.4.1 Ext does Remoting with Direct
Web Remoting is a means for JavaScript to easily execute method calls that are defined on the server side. It is extremely convenient for development environments where you would like to expose your server side methods to the client and not have to worry about all of the muck with AJAX connection handling. Ext.Direct takes care of this for us by managing AJAX requests and acts as a bridge between the client side JavaScript and any server side language.
This functionality has great advantages to it, which include method management in a single location as well as unification of methods. Having this technology inside of the framework will ensure consistency across the consumers such as the data classes. Speaking of which, see how the addition of Ext.Direct brings new classes to the data classes.
....

jay@moduscreate.com
13 May 2009, 3:51 AM
I'm still trying to get my head around why Ext.direct would ever return a textarea?

What's the rationale behind this with Ext.direct?

Can you explain this a bit further? Where did you get this impression?

jay@moduscreate.com
13 May 2009, 3:54 AM
http://extjs.com/blog/2009/05/13/introducing-ext-direct/

aconran
13 May 2009, 6:38 AM
I'm still trying to get my head around why Ext.direct would ever return a textarea?

What's the rationale behind this with Ext.direct?

Sorry for this is not explained in the specification better. The response that crp_spaeth has given above is correct. The only time this occurs is when you are doing a multipart file upload and have uploaded a file and/or other form post to a hidden iframe.