cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Maisonneuve <>
Subject send/receive java object with ajax
Date Sun, 28 Aug 2005 13:18:34 GMT

I would like : 

1- in the flowscript retrieve a simple POJO object and serialize it  in xml dom:
obj  {
 ob2= {

<obj id=" " name="">
     <obj2 coco=" foo=""/>
     <obj3 coc2=" foo=""/>
2- send the answer to the browser client (AJAX)
3- create the javascript object according to the xml.

i think 2,3 are ok , but i don't how  do the 1

After the next step is to do:
1 - i have a javascript object
2 -serialize the object in parameter of a url
3- send the request
4- in the flowscript, recreate the object 

so i have 

--- javascript client side ---
//receive function
var obj=XMLToObject(domel);
//send function
var urlencodedobj=ObjectToUrl(obj);

--flowscript server side--
//receive function
var obj=UrlToObject (request)
//send function
var domel=ObjectToXML (obj)

so with these functions , i could communicate and send/retrieve data
without any troubles.
Maybe the idea is not new... so there is maybe some better solutions
to do this..could you point me if it is the case.

nicolas maisonneuve

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message