Ok, got them to work too, just had to let the testcase extend
AbstractDependencyInjectionSpringContextTests and then add the security.xml
to the context loader:
protected String[] getConfigLocations() {
setAutowireMode(AUTOWIRE_BY_NAME);
return new String[] {"/applicationConte
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");
Really strange thing just happened: while trying to demonstrate the
functionality of an ajax call it didn't work (as usual in demonstrations),
only later I found out that the call return 403 access denied, which is the
expected behaviour, so my guess is that secured-annotations="enabled"
actually
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 run appfuse:gen followed by appfuse:install in my core project, and it runs
to completion with no issues. I then cd to my web project and run
mvn appfuse:gen -Dentity=SecuredObject -Dentity.check=false -e
and it fails with the following complaint:
C:\\web\target\appfuse\generated-sources not
2009/1/14 Matt Raible
>
> On Jan 14, 2009, at 2:15 PM, Oscar Alvarez wrote:
>
> Thanks for the reply.
>
>
>
> 2009/1/14 Matt Raible
>
>> Can you please be more specific? What web framework are you using?
>
>
> I'm working with struts 2 basic archetype,
>
>
>> Are you saying that "remove" deletes
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