Hi ppl,
 
        I'm trying to make a custom directive (a "#from <int> to <int> do"
loop), but unfortunatelly the documention about this point in jakarta's site
is poor... so, to start from somewhere, I took the Foreach.java, renamed it
so it responds to "from", but I can't get it to work, it says that the args
for the directive is wrong. here's the part of the exception:
 
org.apache.velocity.exception.ParseErrorException: Invalid arg #1 in
directive #from at line 3, column 1 in template test.vm
at org.apache.velocity.Template.process(Template.java:141)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(Resour
ceManagerImpl.java:423)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Resourc
eManagerImpl.java:341)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java
:831)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java
:813)
at
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.ja
va:285)
at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:469)
...

Any clue anyone?

Thanks in advance...
Thiago Souza

 

Reply via email to