{xmlstring : XMLData.toXMLString()};
--- In flexcoders@yahoogroups.com, "markgoldin_2000"
<[EMAIL PROTECTED]> wrote:
>
> I am getting:
> 1084: Syntax error: expecting colon before rightbrace
> at var oRequest:Object = {xmlstring=XMLData.toXMLString()};
>
>
>
> --- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspratt@> wrote:
> >
> > var oRequest:Object = {xmlstring=XMLData.toXMLString()};
> >
> > myHTTPService.send(oRequest);
> >
> >
> >
> > Now this way, the xml string the server gets will not be valid xml
> > because it will have no root. You can handle this on the server,
> or as
> > I do:
> >
> >
> >
> > When you get the xml from the server , put it in an instance
level
> xml
> > var. (in the result handler). You can copy() it if you need to
> preserve
> > the original for something like undo. Then pull your XMLList or
> > collection directly from this var. Changes made to the xml will
be
> made
> > in the instance var and you can then send it back to the server as
> > above, using toXMLString(). The server will get valid xml and can
> > loadXML() or whatever to parse it.
> >
> >
> >
> > ________________________________
> >
> > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of markgoldin_2000
> > Sent: Wednesday, January 16, 2008 11:15 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Re: HTTPService - save DataGrid data
> >
> >
> >
> > Yes, I am getting XML from tthe server.
> > I am assigning data to DataGrid like this:
> > o.dataProvider = XMLData;
> > where XMLData is XMLList:
> > var XMLData:XMLList = XML(resultXML).copy().someXml
> > <you can send the xml straight back to the server
> > And that is my question: How to do that?
> >
> > Thanks for help.
> >
> > --- In flexcoders@yahoogroups.com <mailto:flexcoders%
> 40yahoogroups.com>
> > , "Tracy Spratt" <tspratt@> wrote:
> > >
> > > You probably got xml from the server. Are you using it
directly,
> > or via
> > > XMLListCollection? If so, then updates to the dataGrid should be
> > > reflected in the main XML and you can send the xml straight
back
> to
> > the
> > > server. This is how I usually do it.
> > >
> > >
> > >
> > > If you generated an ArrayCollection of value objects, you will
> need
> > to
> > > manually build the xml and send it back.
> > >
> > >
> > >
> > > While we are supposed to be able to send xml documents directly
> > using
> > > HTTPService, I heard about trouble with this and have settled
on
> > sending
> > > XML strings via normal contentType by posting name=value pairs.
> > >
> > >
> > >
> > > Tracy
> > >
> > >
> > >
> > > ________________________________
> > >
> > > From: flexcoders@yahoogroups.com <mailto:flexcoders%
> 40yahoogroups.com>
> >
> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%
> 40yahoogroups.com>
> > ] On
> > > Behalf Of markgoldin_2000
> > > Sent: Tuesday, January 15, 2008 2:24 PM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%
> 40yahoogroups.com>
> > > Subject: [flexcoders] Re: HTTPService - save DataGrid data
> > >
> > >
> > >
> > > But I need to send modified DataGrid's data: a dataProvider
that
> > was
> > > initially created in the service's Result event.
> > >
> > > --- In flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com> <mailto:flexcoders%
> > 40yahoogroups.com>
> > > , Scott Melby <smelby@> wrote:
> > > >
> > > > Mark -
> > > >
> > > > You can make your backend code take whatever you like. The
> > > > HTTPService.send will just post to a URL that you specify
> (based
> > on
> > > url
> > > > property). You can then pass params... here is an example.
> > > >
> > > > var params:Object = new Object();
> > > > params.changedItemID = 1;
> > > > params.name = "New Name";
> > > > myHttpService.send(params);
> > > >
> > > > on the backend you can then just parse the request params to
> get
> > > the
> > > > changed data and commit them to your DB etc.
> > > >
> > > > hth
> > > > Scott
> > > >
> > > > Scott Melby
> > > > Founder, Fast Lane Software LLC
> > > > http://www.fastlanesw.com <http://www.fastlanesw.com>
> > <http://www.fastlanesw.com <http://www.fastlanesw.com> >
> > > >
> > > >
> > > >
> > > > markgoldin_2000 wrote:
> > > > >
> > > > > But I am not sure what exaclty I need to provide to the
send
> > > method
> > > > > to post data back to server.
> > > > > --- In flexcoders@yahoogroups.com
> > <mailto:flexcoders%40yahoogroups.com>
> > > <mailto:flexcoders%40yahoogroups.com>
> > > > > <mailto:flexcoders%40yahoogroups.com>, Scott Melby
<smelby@>
> > > wrote:
> > > > > >
> > > > > > Just re-read this and realized I may have mis-understood
the
> > > > > question
> > > > > > :) If you want to save data from grid back to server
after
> > user
> > > > > changes
> > > > > > it, take a look at DataGrid.itemEditEnd event.
> > > > > >
> > > > > > hth
> > > > > > Scott
> > > > > >
> > > > > > Scott Melby
> > > > > > Founder, Fast Lane Software LLC
> > > > > > http://www.fastlanesw.com <http://www.fastlanesw.com>
> > <http://www.fastlanesw.com <http://www.fastlanesw.com> >
> > > <http://www.fastlanesw.com <http://www.fastlanesw.com>
> > <http://www.fastlanesw.com <http://www.fastlanesw.com> > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Scott Melby wrote:
> > > > > > >
> > > > > > > Is there a reason that you can't use SharedObject to
save
> > the
> > > > > grid
> > > > > > > size, etc. on the client side?
> > > > > > >
> > > > > > > hth
> > > > > > > Scott
> > > > > > >
> > > > > > > Scott Melby
> > > > > > > Founder, Fast Lane Software LLC
> > > > > > > http://www.fastlanesw.com <http://www.fastlanesw.com>
> > <http://www.fastlanesw.com <http://www.fastlanesw.com> >
> > > <http://www.fastlanesw.com <http://www.fastlanesw.com>
> > <http://www.fastlanesw.com <http://www.fastlanesw.com> > >
> > > > > > >
> > > > > > >
> > > > > > > markgoldin_2000 wrote:
> > > > > > >>
> > > > > > >> I am using HTTPService to bring data from server. My
> > DataGrid
> > > > > data is
> > > > > > >> an xml. In order to save do I need to convert DataGrid
> data
> > > > > before
> > > > > > >> sending it back to the server?
> > > > > > >>
> > > > > > >> Thanks
> > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>