I'll add documentation to the LzDataset.postbody declaration. On Tue, Apr 14, 2009 at 9:54 AM, André Bargull <[email protected]>wrote:
> Is the current behaviour documented anywhere? If it's not yet documented, > can we make sure it'll be. Otherwise approved. > > > > > On 4/13/2009 6:04 PM, P T Withington wrote: > >> Well, I don't know enough about the usage of this interface to say one way >> or another. >> >> On 2009-04-13, at 11:46EDT, Henry Minsky wrote: >> >> I thought about a warning for that case, but then I thought maybe the >>> user >>> would have query params left over from a previous request, and would be >>> ok >>> with having them ignored when they set the post body. >>> >>> >>> >>> >>> >>> On Mon, Apr 13, 2009 at 8:56 AM, P T Withington <[email protected] >>> >wrote: >>> >>> You have a Debug.info left in your code. >>>> >>>> I think that if the postbody is going to clobber queryparams, you should >>>> issue an error in debug mode. It can't be right that the caller is >>>> going to >>>> set up params and then ignore them, can it? >>>> >>>> >>>> On 2009-04-11, at 16:14EDT, Henry Minsky wrote: >>>> >>>> + previous changeset was missing var declaration for lzpostbody >>>> >>>>> >>>>> >>>>> Change 20090411-hqm-G by [email protected] on 2009-04-11 16:12:13 EDT >>>>> in /Users/hqm/openlaszlo/trunk5 >>>>> for http://svn.openlaszlo.org/openlaszlo/trunk >>>>> >>>>> >>>>> Summary: make postbody get transmitted, regardless of other query >>>>> params >>>>> >>>>> New Features: >>>>> >>>>> Bugs Fixed: LPP-8042 >>>>> >>>>> Technical Reviewer: a.bargull >>>>> QA Reviewer: ptw >>>>> Doc Reviewer: (pending) >>>>> >>>>> Documentation: >>>>> >>>>> Release Notes: >>>>> >>>>> Details: >>>>> >>>>> + Setting the postbody should always cause the raw data to be >>>>> transmitted, >>>>> even in other query params have been set. >>>>> >>>>> This implementation makes it so that setting postbody overrides any >>>>> query params, regardless of whether the call to set postbody comes >>>>> before or after the call set query params. Once postbody has been set, >>>>> the only way to disable it's action is to set postbody to null. >>>>> >>>>> Tests: >>>>> >>>>> run this in test/data >>>>> >>>>> <canvas> >>>>> <dataset name="foo" src="http:echoUTF8.jsp" >>>>> request="false" >>>>> ontimeout="Debug.write(this.name + ': timed out')" >>>>> onerror="Debug.write(this.name + ': error')" >>>>> ondata="Debug.write('Response: ' + >>>>> this.getPointer().serialize())" >>>>> >>>>>> >>>>>> </dataset> >>>>> >>>>> <simplelayout/> >>>>> <button text="post raw data"> >>>>> <handler name="onclick"> >>>>> foo.setAttribute('querytype', 'post'); >>>>> foo.setQueryParam('flavor', 'vanilla'); >>>>> foo.setAttribute('postbody', "This is a raw post body"); >>>>> foo.doRequest(); >>>>> </handler> >>>>> </button> >>>>> </canvas> >>>>> >>>>> The returned data from the server should indicate that only the >>>>> postbody >>>>> value was >>>>> sent >>>>> >>>>> calling foo.doRequest() «<dataset>#1#0| #foo» >>>>> Response: <foo><response><formcomponent method="POST" name="This is a >>>>> raw >>>>> post body" hex=""></formcomponent></response></foo> >>>>> >>>>> Files: >>>>> M WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs >>>>> M WEB-INF/lps/lfc/data/LzDataset.lzs >>>>> >>>>> >>>>> Changeset: >>>>> http://svn.openlaszlo.org/openlaszlo/patches/20090411-hqm-G.tar >>>>> >>>>> >>>> >>>> >>> >>> -- >>> Henry Minsky >>> Software Architect >>> [email protected] >>> >> >> >> -- Henry Minsky Software Architect [email protected]
