HelloAction.js
Summary
Contains HelloAction class.
This is part of Troika.ASP Framework - web development MVC framework for ASP 3.0.
Please visit www.troika-asp.com for more details.
Version: $Revision: 1.4 $
Author: Pavel Chuchev pav@troika-asp.com
|
Class Summary
|
| HelloAction |
This is HelloAction class command implementation. |
HelloAction.prototype = new Command();
HelloAction.prototype.constructor = HelloAction;
HelloAction.prototype.init = function (config) {
Command.prototype.init.call(this, config);
return this;
};
function HelloAction(config) {
if (arguments.length) {
this.init(config);
}
}
HelloAction.prototype.execute = function (environment, helloForm) {
var result = new ResponseContext(this.findForward(helloForm, "success"));
if (helloForm.visitorName.trim()) {
result.models.put("now", new Date().toString());
Logger.log.info("Visitor name: " + helloForm.visitorName);
}
else {
result.forward = this.findForward(helloForm, "action-error");
result.errors.add(new Error("Name cannot be empty!"));
}
return result;
};
www.troika-asp.com
Documentation generated on Sun Jun 15 17:59:32 2008