BackendService: Class connecting to a REST webservice and handling success of failure of the service call.
Usage:
<canvas> <dataset name="i18nDS" src="rest/application/i18n" type="http" request="true" proxied="false" /> <BackendService name="i18n" successDatapath="i18nDS:/app/currentLocale"> <handler name="ontrigger" args="obj"> this.prepareParams(obj.collectValues()); </handler> <method name="handleError"> Debug.write('Error requesting application resource bundle (i18n)!'); </method> <method name="handleSuccess"> Debug.write('Resource bundle loaded'); // If we are already logged in, we have to reload the data // containing I18N strings if (canvas.loggedIn) { canvas.services.listTasks.startRequest(); canvas.services.listProjects.startRequest(); canvas.services.listUsers.startRequest(); } </method> </BackendService> </canvas> @END
How much time should we wait before removing the error message. Of course this value can be overriden in any instance
If we display an error message in a form we fwant to be able to clear that message after a certain time. This is the delegate used for the timer
The xpath singalling a request error
HTTP method: POST or GET
The xpath which has to match for a successful request
Used as an event sender by the ServiceConnectors connecting to this service
Copyright 2002-2005 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.