Community Page
- www.cuppadev.co.uk Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- What I can say is very nice and helpful as well as informative post...really help me very much more!! Thanks.. Cheers, <a href="http://sain-web.com" rel="nofollow">Buat...
- You’re working on a proof of concept for your business and have only rough developments to show investors. This is still “friends & family” territory, but some Angel investors might be willing...
- Insightful read. I have just bookmarked this at stumbleupon. Hope others find it as interesting as I did.
- thank you for this information..
- Nice post there. Raised a few things I hadn't thought about before. Thx.
Jump to original thread »
One of the things that got me interested in OpenLaszlo was its pretty cool databinding features, which meant i could take in data from any standard XML document (be it a web page, xmlrpc, or even SOAP) and prototype a little interface around it very quickly, as i previously mentioned in
... Continue reading »
1 year ago
Thanks very much for the suggestion. It seems to work rather nicely. :)
Regards,
James
1 year ago
In an upcoming release, this will be accessed via a new API on dataset called setPostBody().
1 year ago
a
b
cc
var xmlString = canvas.datasets['theData'].serialize();
datasetForSending.setQueryParam("xml", xmlString);
datasetForSending.setQueryType("POST");
datasetForSending.doRequest();
1 year ago
I tried the setQueryParam() in LZ 3.3.3 and 4.0.10 to post data and it doesn't work ! I also tried the setPostBody() in LZ 4.0.10 and it also failed! You seem to have made it work... could you post an example?
FYI, here is my dataset…
<dataset name="dsSendData" src="$once{'http://localhost:8080/cocoon/devHeryk/metadata/sendMeta/' + LzBrowser.getInitArg('getMeta') + '.xml'}" request="false" type="http"/>
and my 2 attempts with setQueryParam()…
<method name="sendData" args="action">
var dp =canvas.datasets.meta.getPointer();
var d =canvas.datasets.dsSendData;
dp.selectChild();
var sRequest = dp.serialize();
d.setQueryParam("lzpostbody",sRequest);
d.setQueryType("POST");
d.doRequest();
</method>
and setPostBody()…
<method name="sendData" args="action">
var dp =canvas.datasets.meta.getPointer();
var d =canvas.datasets.dsSendData;
dp.selectChild();
var sRequest = dp.serialize();
d.setPostBody(sRequest);
d.setQueryType("POST");
d.doRequest();
</method>
Thanks
Héryk
1 year ago
I've not played about with OpenLaszlo for months, but i'll see what i can recall.
If you take a look at one of my other posts, specifically http://www.cuppadev.co.uk/2007/08/08/openlaszlo-version-of-the-previous-flex-example/ , then i eventually figured out that the "lzpostbody" parameter was the key.
The code i ended up with is http://www.cuppadev.co.uk/assets/2007/8/8/manage_test.txt .
Keep in mine though that if you are running your app in SOLO mode, then in all likelihood your POST data will automagically be escaped. My solution to that snag here -> http://www.cuppadev.co.uk/2007/08/09/openlaszlo-xml-workaround/ .
Good luck. :)
1 year ago
Thanks for the rapid response!!!
This is a major drawback in the usability of OpenLaszlo in designing XML driven applications. I spent several weeks learning and designing a Laszlo XML driven FGDC metadata editor... and let’s just say that I’m very disappointed with this outcome! Isn’t Laszlo’s strength supposed to be XML driven applications??!!!! Dop!
I’ll follow your suggestion and try to implement a solution on the server side (Apache Cocoon http://cocoon.apache.org/) to decode Laszlo's xml Post.
I posted my question on the Laszlo forum here: http://forum.openlaszlo.org/showthread.php?p=37241#post37241
I hope this will be fixed in a near future!
Cheers
Héryk