On Fri, Apr 15, 2011 at 1:03 PM, Biesbrock, Kevin wrote:
> So I have a block of contact information that we would like to appear 
> similarly whenever it's displayed.  So on our home page, on a printable 
> confirmation page, or in a generated email -- it should always appear the 
> same.  Yesterday I emailed this group about this a little bit (and forgot to 
> mention the context in this email), titled: 'Reading .properties From 
> Top-Level Package'.  Eric Lents suggested:
>
>> E-mail and Velocity are like peanut butter and jelly.
>
> So I found documentation on how to compile a Velocity template in a java 
> class but cannot find anything that would show my e.g. contact block on the 
> homepage.  So I thought *maybe* the best approach would be to use an s:action 
> tag that returned a Velocity result of the template I requested.
>
> In terms of my email, I can use Velocity to generate the email with no 
> problem -- and can even include, toward the bottom, the contact block.
>
> Does that help identify my use-case a little more clearly?

Yep.

Do the templates use the same models as the web layer? If so, seems
like direct rendering would be *much* more efficient.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to