...
[12:56:07 CDT(-0500)] <TonyUnicon> no worries, easier to fix now then at the demo!
[14:46:23 CDT(-0500)] <JasonElwood> IRSC wants to list the strengths from the action plan on the email version. In the current template, the tasks comes from a taskTO (taskTO.name, taskTO.description) and goal from a goalTO. The only place I can find the strengths is a column on the person table. How can I reference the strengths in the template to show them in the email?
[15:20:31 CDT(-0500)] <dmccallum54> JasonElwood you get an answer to the strengths question already?
[15:20:43 CDT(-0500)] <JasonElwood> No
[15:20:54 CDT(-0500)] <JasonElwood> And I won't repeat what Jim told me to go do
[15:20:55 CDT(-0500)] <dmccallum54> k. i'll look at it now
[15:22:16 CDT(-0500)] <JasonElwood> I tried $person.strengths
[15:22:44 CDT(-0500)] <dmccallum54> what a ridiculous idea
[15:24:09 CDT(-0500)] <JasonElwood> these templates are insane
[15:30:03 CDT(-0500)] <dmccallum54> can you try $student.strengths
[15:31:44 CDT(-0500)] <JasonElwood> testing
[15:33:41 CDT(-0500)] <JasonElwood> that worked. sweet dude
[15:34:15 CDT(-0500)] <JasonElwood> I would document the templates if I thought I understood what's going on
[15:39:51 CDT(-0500)] <dmccallum54> so
[15:41:10 CDT(-0500)] <JasonElwood> they're just a mess. I don't know how half of them even work
[15:41:31 CDT(-0500)] <dmccallum54> works basically the same as a typical controller-JSP relationship where the controller makes a bunch of objects available to the JSP under well-known names and the JSP renders parts of that data however it wants. but the two components are still somewhat tightly coupled to the extent that the JSP can't render anything the controller doesn't make available to it
[15:41:48 CDT(-0500)] <dmccallum54> and of course they have to agree on these well-known names
[15:41:49 CDT(-0500)] <dmccallum54> so
[15:42:07 CDT(-0500)] <dmccallum54> in this case, here is the code that populates the map of objects made available to the email template
[15:42:08 CDT(-0500)] <dmccallum54> https://gist.github.com/dmccallum/5391113
[15:42:26 CDT(-0500)] <dmccallum54> it's from MessageTemplateServiceImpl
[15:42:38 CDT(-0500)] <dmccallum54> that's how i guessed at using "student." rather than "person."
[15:42:59 CDT(-0500)] <JasonElwood> very reasonable
[15:43:27 CDT(-0500)] <JasonElwood> I get the jsp-controller part no problem. I don't get the agreed upon names. there doesn't seem to be consistency.
[15:43:48 CDT(-0500)] <JasonElwood> at least between objects
[15:43:56 CDT(-0500)] <JasonElwood> but I'll dig in
[15:45:22 CDT(-0500)] <dmccallum54> unfortunately the map building is kinda spread out
[15:45:43 CDT(-0500)] <dmccallum54> there's a bunch of it MessageTemplateServiceImpl. and the names there are fairly consistent
[15:46:04 CDT(-0500)] <dmccallum54> but you'll find other maps being built in EarlyAlertServiceImpl, for example
[15:46:34 CDT(-0500)] <dmccallum54> and that one in particular doesn't follow the "student" convention
[15:46:50 CDT(-0500)] <dmccallum54> to get to the equivalent object you'd have to use $earlyAlert.person
[15:48:54 CDT(-0500)] <JasonElwood> cool. I'll look. thanks man