You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Stewart, Robbie (Contractor)" <Ro...@dsto.defence.gov.au> on 2001/05/22 10:26:20 UTC

dynamic reloading of velocity macros

Gidday,
When developing templates, the velocity servlet seems to reload modified
templates 
without the need to kick the servlet server just fine. However if the
template modifications
are to macros these are not reloaded. Is this a bug/feature/my bad?
 
Ciao,

Robbe Stewart         Software Engineer 
Altasys Software        +61 414 68 6126

Contracted to:          
Department of Defence   mailto:Robbie.Stewart@dsto.defence.gov.au
<ma...@dsto.defence.gov.au>  
Salisbury SA

AUSTRALIA


Re: dynamic reloading of velocity macros

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
"Stewart, Robbie (Contractor)" wrote:
> 
> Gidday,
> When developing templates, the velocity servlet seems to reload modified
> templates
> without the need to kick the servlet server just fine. However if the
> template modifications
> are to macros these are not reloaded. Is this a bug/feature/my bad?
> 

Feature!

What the idea is that by default, macros 'go global' - once they are
'registered' by parsing a #macro() directive and body, its available for
all templates to use ( you can stop this via the
velocimacro.permissions.allow.inline.local.scope configuration key which
is false by default.)

Anyway, once a template is registered, by default it cannot be changed -
first version in wins.  You can override this via the

velocimacro.permissions.allow.inline.to.replace.global 

configuration key.  Set it to true.

geir


-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."