History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4660
Type: Bug Bug
Status: Verified Verified
Resolution: Fixed
Priority: -- --
Assignee: Unassigned
Reporter: Pablo Kang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Httpdatarequest has LzLoader value for xmldata when status is "error"

Created: 05/Sep/07 01:14 PM   Updated: 23/Oct/07 03:21 PM
Component/s: LFC - Data
Affects Version/s: 4.0.3
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: 1. File LPP-4660.lzx (0.5 kb)


Severity: Minor
Fixed in Change#: 6,377
Runtime: N/A
Fix in hand: False


 Description  « Hide
This happens in SOLO mode. Probably not in proxy mode though I haven't tried it.

I'd expect the xmldata value to be null.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Henry Minsky - 05/Sep/07 02:23 PM
test case
<canvas width="100%" height="80%" debug="true">
  <debug fontsize="12"/>

  <dataset name="ds" src="http:nosuchfile.xml" onerror="canvas.doerr()"/>
  <method name="doerr" args="xd">
    Debug.write('doerror ', xd);
  </method>

</canvas>

Should return null as value of xd arg, not an instance of Lzloader


Henry Minsky - 05/Sep/07 05:28 PM
More convenient test case

<canvas width="100%" height="80%" debug="true">
  <debug fontsize="12"/>

  <!-- use new "datafromchild" attribute to let me define method in dataset :-) -->
  <dataset request="true" datafromchild="true"
     name="ds" src="http:nosuchfile.xml" onerror="this.doerr()">
     <method name="doerr" args="xd">
     Debug.write('doerror ', xd);
     if (xd == null) {
         Debug.write("test passed, null value returned");
     } else {
         Debug.error("test failed, null value not returned");
     }
     </method>
  </dataset>

</canvas>



Henry Minsky - 06/Sep/07 04:45 AM
r6377 | hqm | 2007-09-05 21:25:04 -0400 (Wed, 05 Sep 2007) | 40 lines
Changed paths:
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as
   M /openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/kernel/swf/LzLoader.lzs

Change 20070905-hqm-6 by hqm@IBM-2E06404CB67 on 2007-09-05 20:33:42 EDT
    in /cygdrive/c/users/hqm/openlaszlo/wafflecone3/WEB-INF/lps/lfc
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone/WEB-INF/lps/lfc

Summary: fix for return value of onerror event in data loading

New Features:

Bugs Fixed: LPP-4660

Technical Reviewer: pkang (pending)
QA Reviewer: andre (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

When the XML SOLO data loader in LzLoadQeueue got no data, it was returning the LzLoader as a return value
in an onerror event. This was confusing, so this changes the return value to null.

There was also some broken code which was supposed to set the status value of the data request, but
was referencing class static variables for the constants in a way that didn't work, and thus getting
undefined values. Not sure how this ever worked.



Tests:

see bug report
also
test/lfc/data
lzpix (SOLO)
amazon (SOLO) http://127.0.0.1:8080/wafflecone3/demos/amazon/amazon.lzx?lzproxied=false


Steve O'Sullivan - 23/Oct/07 03:21 PM
The variable xd contains 'null', as expected. Tested in SOLO deployment. The following is returned in the debug window:

WARNING: LzLoadQueue.XMLOnDataHandler load failed from URL 'nosuchfile.xml?__lzbc__=1193177539578', no data received.
WARNING: Failure to load data in serverless apps may be caused by Flash player security policies. Check your data server crossdomain.xml file
doerror undefined
test passed, null value returned

Tested on Firefox 2.0.0.8 and IE7, Windows; Firefox 2.0.0.8 and Safari 2.0.4 Macintosh. Verified.