Hi Jean-Baptiste,

I'm not sure how you work with your forms to capture the data. Generally, I use a dataset, with empty values, to bind to all form fields and, after client-side validation, send the entire dataset back to the server in its serialised form (using HTTP POST):

var params = new LzParams();
var _dataPointer = datasetName.getPointer();
params.addValue('xmlData', _dataPointer.p.serialize(), true);

Cheers

Jens

Jean-Baptiste BRIAUD wrote:
Hi Geoff,

Yes, I'm developping the server, so I everything is open.
I used SOAP on a previous project and it is dam' slow.
XML-RPC could be OK but I would prefer having my own XML.

I fully agree : nothing by the URL.

Could you confirm that the following code snipset ensure that data won't be transmitted via URL :
LzParam.addValue("xml", theXmlText, false)
// I assumed the last parameter set to false ensure that.

So, how do I build my XML on laszlo side ?
Is it just string concatenation ?
Is there more efficient than that ?
Do I just pass that XML as a request paremeter ?
Or is there other way than parameter to pass a large text to an HTTP request ?

Thanks !

Geoff Crawford wrote:
At 05:01 PM 5/20/2007, Jean-Baptiste BRIAUD wrote:
More precision : in fact, I have to send back to the server in XML the content of a form. For simple value, it is simple : one name in the form could be one parameter with 'name' as a key. It become more difficult for multiple values like several book in a basket for example.
I could add several books with keys like 'book1', 'book2', ...

What kind of mecanism would you advice me to use ?
I'm seeking for a mecanism that could work on any possible cases.
Including not only multiple simple object but also multiple complex object like several Addresses.

Any idea ?

#1 issue you haven't really described - what's at the other
end on the server?  If it's formalized and you want many
integration possibilities on the client side, SOAP is a
good solution and probably the most portable, but then
it's the most complicated.  JSON is a potential alternative
but what ever is at your server may not support it.

If the server is entirely in your control and not built
yet, you may want to keep it simple and simply pass info
back and forth through CGI scripts.

1. There are potentially limits in some web servers on
the size of URL parameters.  Don't do that.  Use a POST
where web servers expect data

2. Use LZ built in functionality if possible, SOAP, XML-RPC, etc.
the idea is Laszlo takes care of compiling for the right platforms,
etc. so let it deal with the issues.  This is better than just
grabbing some open source J/S (like soapclient.js or the like)

3. In the end HttpXMLRequest is what it's all going to translate
down to.  Just don't use the URL to pass data, get it in the
POST request whether you use a built-in Laszlo class or create
your own.


=======================================================================
Geoff Crawford                          Phone:         (973) 361 - 4224
Innov8 Computer Solutions, LLC          FAX:           (973) 537 - 6946
711 Route 10 East, Suite 204            Email:       [EMAIL PROTECTED]
Randolph NJ 07869                       Web: http://www.processware.biz

                 ProcessWare ERP for the Chemical Industry





begin:vcard
fn:Jens Richnow
n:Richnow;Jens
adr:Riccarton;;9A Homer Place;Christchurch;;8004;New Zealand
email;internet:[EMAIL PROTECTED]
title:Director
tel;cell:021 2300078
x-mozilla-html:TRUE
url:http://www.framedobjects.com
version:2.1
end:vcard

Reply via email to