I do not have the application compiled with the SOLO flag. But I do
have proxy=false set for the program and all data fetches are going
directly to a back-end server without using the laszlo proxy. I can't
find any instance of lzpostbody in the code. I tried both
setPostBody() and setAttribute('postbody', ) without success.
Henry Minsky wrote:
Is your application running as a SOLO app, or proxied?
I'm curious as to what is causing the behavior you're seeing. I wish
we had a standalone test case!
There was an older API convention whereby if there was a query arg
named "lzpostbody", it would
be used as the sole content of the POST request; that was deprecated
in favor of the setPostBody
call. Note, setPostBody is actually now deprecated in favor of
setAttribute('postbody', value), in trunk.
Is it possible there is an lzpostbody query arg getting set someplace
else on your dataset?
That would override the value that you are setting via setPostBody.
On Wed, Mar 18, 2009 at 3:48 PM, Charles Watt <[email protected]> wrote:
Henry,
Thanks for the response. Yes the XML is valid and the dataset is declared
to be of type http.
The part that is frustrating me is that the stand-alone program below works
correctly. But if I cut/paste it into the larger program, it does not.
Within the larger program I have found no way to keep the __lzbc__ from
overwriting my manually created post body. There are no namespace
conflicts. I do have other datasets accessing exactly the same URL using a
GET method. Maybe the cache controls are getting confused between. Rather
than waste more time on the problem, I'm using setQueryParam() to pass the
contents of the XML document that I was trying to upload as a parameter.
That seems to work. And ironically , when I do this, the __lzbc__ goes
away.
<canvas bgcolor="0xEAEAEA" height="615" width="1024" debug="false"
title="DynaCenter-SRM" proxied="false">
<dataset name="Template"
type="http"
querytype="GET"
request="true"
cacheable="false"
clientcacheable="false"
src="" class="moz-txt-link-rfc2396E" href="http://192.168.9.11/cgi-bin/dcsrm/servers/1/1-template-fail-1">"http://192.168.9.11/cgi-bin/dcsrm/servers/1/1-template-fail-1"
/>
<dataset name="wrTemplate"
type="http"
querytype="POST"
request="false"
cacheable="true"
clientcacheable="true"
src="" class="moz-txt-link-rfc2396E" href="http://192.168.9.11/cgi-bin/dcsrm/servers">"http://192.168.9.11/cgi-bin/dcsrm/servers"
<attribute name="baseURL" type="string"
value="http://192.168.9.11/cgi-bin/d
csrm/servers"/>
</dataset>
<view datapath="Template:/">
<button>Click Me
<handler name="onclick">
<![CDATA[
var myRequest=wrTemplate['baseURL'] + '/1/1';
var myData="view=template&target=1&xml=" +
parent.datapath.serialize();
Debug.write(myData);
wrTemplate.setSrc(myRequest);
wrTemplate.setPostBody(myData);
wrTemplate.doRequest();
]]>
</handler>
</button>
</view>
</canvas>
|