You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Andrew Wirt <aw...@umich.edu> on 2002/06/05 21:25:27 UTC

double rendering

Hi,

    I am using a velocimacro to create some dhtml with a java class :

#macro ( menu $m)

    $m.getHtml()

#end

and would like the String returned to again be rendered by the velocity engine, as my java class writes some references that I need eval'd at run-time.

Is this possible?  I saw the #parse command, but that seems to be just for files, and I don't want to have to write the String to a file.

Thanks to anyone who can help.

- Andrew Wirt



Re: double rendering

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 6/5/02 3:25 PM, "Andrew Wirt" <aw...@umich.edu> wrote:

> Hi,
> 
>   I am using a velocimacro to create some dhtml with a java class :
> 
> #macro ( menu $m)
> 
>   $m.getHtml()
> 
> #end
> 
> and would like the String returned to again be rendered by the velocity
> engine, as my java class writes some references that I need eval'd at
> run-time.
> 
> Is this possible?  I saw the #parse command, but that seems to be just for
> files, and I don't want to have to write the String to a file.
> 
> Thanks to anyone who can help.

The usual approach is to make a little tool that allows you to use the
Velocity.evaluate() method to render.

I need to take some time off for Velocity catch-up - I'll make a little eval
tool and  #eval() directive and put in contrib...

        
-- 
Geir Magnusson Jr.
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>