Hi,
I'm trying to bind a simple form to a XML file so that it produces the request and the response automatically using a RestDataSource. I've been reading several posts about overwriting transformRequest() and transformResponse() and also the extensive documentation about SmartClient data binding.
So far it's clear how to bind the data this way to work with tables and trees (and that's used in the examples) but a simple form isn't so easy for me. It's always sending the form fields as params.
I'm setting the request and response to XML:
setDataFormat( DSDataFormat.XML );
setDataProtocol( DSProtocol.POSTXML );
Do you know if is there something as simple as:
nameField.setValueXPath("/name");
addressField.setValueXPath("/address");
So that it generates a xml like the following:
<response>
<status>ok</status>
<data>
<name>A Name</name>
<address>An address</address>
</data>
</response>
Does it need to be more complicated or am I missing anything ?
Thanks in advance,
Juan
I'm trying to bind a simple form to a XML file so that it produces the request and the response automatically using a RestDataSource. I've been reading several posts about overwriting transformRequest() and transformResponse() and also the extensive documentation about SmartClient data binding.
So far it's clear how to bind the data this way to work with tables and trees (and that's used in the examples) but a simple form isn't so easy for me. It's always sending the form fields as params.
I'm setting the request and response to XML:
setDataFormat( DSDataFormat.XML );
setDataProtocol( DSProtocol.POSTXML );
Do you know if is there something as simple as:
nameField.setValueXPath("/name");
addressField.setValueXPath("/address");
So that it generates a xml like the following:
<response>
<status>ok</status>
<data>
<name>A Name</name>
<address>An address</address>
</data>
</response>
Does it need to be more complicated or am I missing anything ?
Thanks in advance,
Juan
Comment