Hi Jean-Baptiste According to my knowledge of OpenLaszlo socalled data-binding via the 'src' attribute of 'dataset' is in fact not data-binding but just data-bound data-retrieval. It's a one-way functionality. Isn't it?
And again according to my understanding of Laszlo things to udate/delete/insert data to the 'src' you have to call some server side program (php, jsp, asp, etc) that can handle data sources (e.g. a XML-file, a relational DB). Did you read chapter 35: Building Data-Driven Applications in the software egnineer's guide? Peter -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Baptiste BRIAUD Sent: Friday, October 19, 2007 12:50 PM To: [email protected] Subject: [Laszlo-user] Sending dataset over HTTP Hi the list ! I would like to send over HTTP the content of a dataset. Nothing complex ins't it ? But I got problems ... Let me explain : <dataset name="PetCreate1_pet_embeded_ds"> <pet animal="aaa" entryDate="aaa" dateBirth="aaa" age="aaa" name="aaa" sex="aaa" streetNumber="aaa" streetName="aaa" code="aaa" town="aaa" </pet> </dataset> That dataset if mapped via xpath to different text field. (that dataset do not come from HTTP but is hardcoded like that in the lzx. Here is the code I use to send the dataset : <handler name="onclick"> var ds = PetCreate1_pet_embeded_ds; Debug.write("Seding data ..."); ds.setAttribute("querytype", "POST"); ds.setAttribute("type", "http"); ds.setAttribute("request", "false"); ds.setAttribute("src", "test/nimportequoi"); //var param = new LzParam(); //var xml = ds.getPointer().serialize(); //Debug.write(xml); //param.addValue("xml", xml, true); //ds.setQueryString(param); ds.doRequest(); </handler> As you can see I try different thing to pass the XML. I have to explicitly add xml string as a param if I want to catch it on the Servlet. In other words, with that commented version, no XML on the servlet ! Why ? In other part of my program I got on the servlet the following error : 2007-10-19 12:21:06.076::WARN: /petshop/: java.net.MalformedURLException: no protocol: <localdata/> or depending on some line commented or not, 2 2007-10-19 12:21:06.076::WARN: /petshop/: java.net.MalformedURLException: no protocol: <here all the dataset XML> So I got the XML but with that error everytime. Any clues ? thanks !
