Shailesh,
This is exactly what I wanted. I have overlooked this method!
Thanks for the response!
Shan
Shailesh Patel wrote:
>
> Shan -
>
> You can use the evaluate method on a VelocityEngine instance -- pass in
> your
> own StringWriter:.
>
> See
> http://velocity.apache.org/engine/releas
it is a little bit ugly to do that in Velocity, here is the way I do it
//TODO: these stuff need to be injected
VelocityEngine ve = new VelocityEngine();
try {
Properties p = new Properties();
p.setProperty("resource.loader", "string");
Shan -
You can use the evaluate method on a VelocityEngine instance -- pass in your
own StringWriter:.
See
http://velocity.apache.org/engine/releases/velocity-1.4/api/org/apache/velocity/app/VelocityEngine.html#evaluate(org.apache.velocity.context.Context,%20java.io.Writer,%20java.lang.String,%20
I will try to ask this in Velocity forum. It would be very convenient if we
have a overloaded VelocityUtil.mergeTemplatexx that takes InputStream
instead of template file name ;) .
Thanks!
ashan wrote:
>
> I'm using appfuse 2.x. I need to let user to customize email content
> before sending.
I'm using appfuse 2.x. I need to let user to customize email content before
sending. So I have a screen with textarea that shows velocity template so
that user can add their additional contents / customize current content
before sending.
Is there a way to pass this modified content to template