You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Steve Ruby <st...@rubysolutions.com> on 2001/02/22 23:08:16 UTC
Macro Loading
I'm using macros via a parse file.
If find that when velocity first loads I'm not getting
the value of the macros as expected... This doesn't
appear to be the case with macros that are in the calling page.
Once I reload the page everything is fine...
Am I doing someting wrong or is this the nature of the
way the pages are being loaded?
(I'm using velocity via turbine BTW).
Re: Macro Loading
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Steve Ruby wrote:
>
> I'm using macros via a parse file.
>
> If find that when velocity first loads I'm not getting
> the value of the macros as expected... This doesn't
> appear to be the case with macros that are in the calling page.
>
> Once I reload the page everything is fine...
>
> Am I doing someting wrong or is this the nature of the
> way the pages are being loaded?
>
> (I'm using velocity via turbine BTW).
It's a problem -> because the #parse() isn't 'executed' until when the
tempalate is rendered, and when the template is being parsed, the VMs
defined in the soon-to-be-parsed file haven't been registered.
Only solutions I can offer right now is to preload via the library
feature, or just deal with it.
'Lazy' or 'just-in-time' VM stuff is 'on the list'.
geir
--
Geir Magnusson Jr. geirm@optonline.com
Developing for the web? See http://jakarta.apache.org/velocity/