|
|
|
test case:
<canvas width="100%" height="80%" debug="true"> <debug fontsize="12"/> <dataset name="myds" type="http" > <handler name="ondata"> // ondata not firing w/ OL 4.0.5 SWF Debug.write("ondata fired", this); </handler> </dataset> <view id="myview"> <handler name="oninit"> Debug.write("oninit handler for ",this); myds.setSrc("foo.xml"); myds.doRequest(); </handler> </view> <dataset name="myliteral"> <foo>bar</foo> <method name="baz"> This is actually supposed to be interpreted as raw XML data, not a method </method> </dataset> </canvas> make sure 'ondata fired' prints in the debugger and no compiler warning is generated ------------------------------------------------------------------------
r6855 | hqm | 2007-10-15 22:36:23 -0400 (Mon, 15 Oct 2007) | 42 lines Changed paths: M /openlaszlo/trunk/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/dhtml/LzHTTPLoader.js M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzHTTPLoader.as M /openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java Change 20071015-hqm-2 by hqm@IBM-2E06404CB67 on 2007-10-15 16:39:47 EDT in /cygdrive/c/users/hqm/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: fix dataset timeout event callback New Features: Bugs Fixed: Technical Reviewer: andre QA Reviewer: pkang Doc Reviewer: Documentation: Release Notes: Details: The code in LzHttpDataProvider which dispatched on the datarequest status type was always calling loadResponse, which always set the requests status to error if data was null. Modified the code in LzHttpDataProcider.loadTimeout to just directly call the onstatus event iinstead of calling loadResponse. DHTML timeout checking code rewritten by andre to be more efficient Tests: test/lfc/data/alldata.lzx amazon app calendar app smokecheck Merged into wafflecone
Committed revision 7037. (wafflecone branch r7137 - Cranberry RC)
Ran testfile from my-app (need to create foo.xml in my-apps). Also ran alldata.lzx earlier this week on r7102 - Cranberry RC. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
<dataset name="myds" type="http" datafromchild="true">
<handler name="ondata">
// ondata not firing w/ OL 4.0.5 SWF
Debug.write("ondata fired", this);
</handler>
</dataset>
"datafromchild" attribute says that if there is literal data, it is contained within a child <data> node (new syntax for 4.0). It also
tells the compiler that the body of the <dataset> is not literal data.
We need to fix the compiler to obey the 3.x semantics, which was that if the dataset type was http, the body
of the dataset was treated like view content instead of literal data.