res.data.title = "Edit "+this.__prototype__; res.data.action = "edit"; if (req.data.submit) { if (this.edit(req.params)) { res.redirect(this._parent.href("list")); //redirect back to list page } //otherwise the error mesg will be in res.mesage so just render form page again below } this.renderPage("form");