struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joey <realghost...@gmail.com>
Subject Re: JSON and ExtJS
Date Sat, 22 Dec 2007 02:38:15 GMT
ExtJS script submit code is sth like this :
 fs.submit({url:'save.action', waitMsg:'Saving Data...'});

ExtJS form submit action is an xhr request to your form url,You just
handle it in struts2 as
you did in a normal html form.But your response must have the same
format with your extjs form reader.I uses json.so my respone is sth
like this:
{"success":true,"errmsg":"","datas":[]},success property is
required.if it is true,extjs form will call actioncompleted
method,otherwise call actionfailed method.



On Dec 22, 2007 9:08 AM, Frans Thamura <flatburger@meruvian.org> wrote:
> just a little another question
>
> i try to use JSON as the communication between S2 and my ExtJS Apps
>
> but I can see we can use Form in ExtJS to replace the Form in HTML
>
> i still dont get how to develop a good JSON based S2, and also the good
> ExtJS apps in the client
>
> esp i am very weak in JSON RPC world,
>
> still dont get how to save S2 - JSON.
>
> in another world I am developng a framework in Swing based, and want to use
> JSON
>
> and since today, I can read the output of S2, but cannot send data and save
> to S2.
>
> any glue guys
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message