Do I need/Is it possible to have runtime Resource loading in Velocity?

J

janib

I have a slight problem. I'm not using resource laoding to get my
velocity templates, but instead I store the template code in component
and then I use Velocity.evaluate to render the output.

For a reason I've developed a directive in my pages that includes
another request inside a velocity template. For example:

<html>
....<div>#render( $content )
</html>

The problem is that when doing the next request (that is rendered with
the same mechanism) it gets evaluated BEFORE the main request is
finished evaluting. The result I was expecting was

<html>
....<div>< LOT's OF HTML HERE>
</html>

but I get

< LOT's OF HTML HERE>
<html>
....<div>
</html>

This behaviour is very obvious and logical when debugging the (my own
basic) MVC cycle.

The behaviour has made be rethink if I might need a ResourceLoader so
that i can get and use a Template instead and then use merge that is
the behaviour I want. This would force me to use a ResourceLoader that
is created Runtime with my component as the resource stream.

Is this very awkward or even possible?

/Jani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top