An abstract class used in implementing Mojo Commands. A Command is an object that encapsulates functionality for processing data and/or business logic.
Example
dojo.provide("sample.command.LoadHtmlCommand");
dojo.require("mojo.command.Command");
dojo.require("sample.service.Locator");
dojo.declare("sample.command.LoadHtmlCommand", mojo.command.Command,
function() {
},{
execute: function(requestObj) {
// invoke a service call to get some Html
var locator = sample.service.Locator.getInstance();
var service = locator.getService("getHtml")
service.invoke(this.getRequest().getParams(), this);
},
onResponse: function(data) {
// handle success response...
},
onError: function(error) {
// handle error response...
}
});
Summary
| An abstract class used in implementing Mojo Commands. |
| |
| Returns the mojo.controller.Request object passed into the Command. |
| Abstract function that must be implemented in a concrete Command class. |
| Abstract function that must be implemented in a concrete Command class. |
| Abstract function that must be implemented in a concrete Command class. |