<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, | |
software distributed under the License is distributed on an | |
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
KIND, either express or implied. See the License for the | |
specific language governing permissions and limitations | |
under the License. | |
--> | |
<library> | |
<class name="datasetHelper"> | |
<attribute name="successHandler" type="object" /> | |
<dataset name="restdataset" type="http"> | |
<handler name="ondata" args="d"> | |
<![CDATA[ | |
//Make sure any cursor status is reset | |
lz.Cursor.restoreCursor(); | |
lz.Cursor.showHandCursor(true); | |
if ($debug) Debug.write("restdataset ondata", d); | |
if (typeof parent.successHandler != undefined && parent.successHandler != undefined && parent.successHandler != null) { | |
parent.successHandler(parent.parent, d); | |
} | |
]]> | |
</handler> | |
</dataset> | |
<method name="call"> | |
if ($debug) Debug.write("this.restdataset ",this.restdataset); | |
this.restdataset.doRequest(); | |
</method> | |
<method name="setServiceSource" args="m,o"> | |
<![CDATA[ | |
var params = "?SID=" + canvas.sessionId; | |
if (o) { | |
for (var key in o) { | |
params += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(o[key]); | |
} | |
} | |
this.restdataset.setAttribute("src", canvas.getServicesUrl() + m + params); | |
]]> | |
</method> | |
</class> | |
</library> |