Problem solved. Not sure why I didn't think of it before. Adding a callback method in the custom router trait did the trick:
// publicized for route action-workers as an effective "callback" for Scalate templating. This publication is required since the convenience
// methods within ScalateSupport are protected and ActionWorkers are freestanding pojos rather than descendants.
def process(template:String, path: String, attributes: (String, Any)*)(implicit request: HttpServletRequest, response: HttpServletResponse): String = layoutTemplateAs(Set(template))(path, attributes:_*)
adding this into some form of CustomRouterTrait (or directly):
implicit val self:SymphonySubRouter = this
lets you hand off rendering to a pojo, which then uses the callback for Scalate purposes:
SomeClass extends CustomRouter(...) {
get("/system/utilities/resources/list") { val rid = new RID(); rid.showRegistrationFormt() }
}
and finally, this implicit pickup for the publicized callback
SomeClassCalledRID(...) extends NothingAtAll {
def showRegistrationForm()(implicit router: SymphonySubRouter, request : HttpServletRequest, response: HttpServletResponse): String = {
// do whatever...
// finally:
router.process("jade", "/some/resource/called/registration.jade")
}
}
HTH. -mjk
On Wednesday, May 8, 2013 4:15:18 PM UTC-5, Mike Klein wrote: