Author: hqm
Date: 2007-08-28 11:30:28 -0700 (Tue, 28 Aug 2007)
New Revision: 6268
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
Log:
Change 20070828-hqm-0 by [EMAIL PROTECTED] on 2007-08-28 14:18:33 EDT
in /cygdrive/c/users/hqm/openlaszlo/wafflecone3
for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
Summary: LPP-4584 duplicate ondata events
LPP-4532 fixes for querystring merging
New Features:
Bugs Fixed: LPP-4584 LPP-4532
Bugs: LPP-4584 LPP-4532
Technical Reviewer: hminsky
QA Reviewer: pbr
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
fix to only create one delegate for handling ondata events
fix to querystring merging to account for '?' char
Tests:
test/lfc/data/alldata.lzx
test/smoke/smokecheck.lzx
Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDataset.lzs
2007-08-28 17:40:31 UTC (rev 6267)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzDataset.lzs
2007-08-28 18:30:28 UTC (rev 6268)
@@ -283,6 +283,10 @@
* @access private
*/
function destroy ( recursiveCall ) {
+ if (this.dsloadDel) {
+ this.dsloadDel.unregisterAll();
+ }
+
var name = this.name;
if (this.oncanvas) {
if (canvas[ name ] === this) {
@@ -638,6 +642,8 @@
// NB: You had better set the onstatus event handler *before* issuing
request
if (this.dsloadDel == null) {
this.dsloadDel = new LzDelegate( this , "handleDataResponse" , dreq,
"onstatus");
+ } else {
+ this.dsloadDel.register(dreq, "onstatus");
}
this.dataprovider.doRequest( dreq );
@@ -650,6 +656,10 @@
*/
function handleDataResponse (datareq) {
+ if (this.dsloadDel != null) {
+ this.dsloadDel.unregisterFrom(datareq.onstatus);
+ }
+
if (datareq.status == LzDataRequest.SUCCESS) {
this.setData(datareq.xmldata, datareq.responseheaders);
} else if (datareq.status == LzDataRequest.ERROR) {
Modified:
openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
2007-08-28 17:40:31 UTC (rev 6267)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs
2007-08-28 18:30:28 UTC (rev 6268)
@@ -6,7 +6,6 @@
* @access public
* @topic LFC
* @subtopic Data
- * @access public
*/
@@ -148,11 +147,7 @@
}
if (querystring != null && querystring.length > 0) {
- if (q.length > 0) {
- q += sep + querystring;
- } else {
- q = querystring;
- }
+ q += sep + querystring;
}
var url = dreq.src
@@ -161,7 +156,7 @@
} else {
// if there are already query args in the url, separate them
with a '&'
if (url.indexOf('?') >= 0) {
- url = url + "&" + q;
+ url = url + "&" + q.substring(1);
} else {
url = url + q;
}
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins