You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Hanasaki JiJi <ha...@hanaden.com> on 2002/12/26 22:04:51 UTC
#macro not redefined by #parse of revised .vm file
I have a .vm template file that #parse("mymacros.vm)
mymacros.vm contains several #macro statements
editing the macro and reloading the template that #parses it does not
update the macro definition
template reloading is turned on and revised templates are reloaded ok
Is this a bug? Is there a way to have the macros redefined by #parse a
file that contains them?
Thanks
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: #macro not redefined by #parse of revised .vm file
Posted by Shawn Church <sh...@boxity.com>.
So, parsing the mymacros.vm works initially, but changes made in mymacros.vm
are not reflected when subsequent parsing occurs?
Does the #parse occur prior to invoking the #macros?
What version of Velocity are you running?
In my tests, x.vm #parses y.vm, which contains an inline macro #z. After
#parse("y.vm") occurs, I invoke #z(). This works fine, and after editing
the #z macro in y.vm and reloading x.vm, the change is also reflected
correctly.
Shawn
-----Original Message-----
From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
Sent: Thursday, December 26, 2002 4:06 PM
To: Velocity Users List
Subject: Re: #macro not redefined by #parse of revised .vm file
cache is turned off (=false)
I am setting up the macros by doing a #parse on a template file that
contains them instead of using the velocimacro.library
Shawn Church wrote:
> Have you set velocimacro.library.autoreload = true in your velocity
> properties file?
>
> From the Velocity user guide:
> velocimacro.library.autoreload - This property controls Velocimacro
library
> autoloading. The default value is false. When set to true the source
> Velocimacro library for an invoked Velocimacro will be checked for
changes,
> and reloaded if necessary. This allows you to change and test Velocimacro
> libraries without having to restart your application or servlet container,
> just like you can with regular templates. This mode only works when
caching
> is off in the resource loaders (e.g. file.resource.loader.cache = false ).
> This feature is intended for development, not for production.
>
> Shawn
>
> -----Original Message-----
> From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
> Sent: Thursday, December 26, 2002 3:05 PM
> To: LIST - Jakarata Velocity
> Subject: #macro not redefined by #parse of revised .vm file
>
>
> I have a .vm template file that #parse("mymacros.vm)
>
> mymacros.vm contains several #macro statements
>
> editing the macro and reloading the template that #parses it does not
> update the macro definition
>
> template reloading is turned on and revised templates are reloaded ok
>
> Is this a bug? Is there a way to have the macros redefined by #parse a
> file that contains them?
>
> Thanks
> --
> =================================================================
> = Management is doing things right; leadership is doing the =
> = right things. - Peter Drucker =
> =_______________________________________________________________=
> = http://www.sun.com/service/sunps/jdc/javacenter.pdf =
> = www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
> =================================================================
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: #macro not redefined by #parse of revised .vm file
Posted by Hanasaki JiJi <ha...@hanaden.com>.
cache is turned off (=false)
I am setting up the macros by doing a #parse on a template file that
contains them instead of using the velocimacro.library
Shawn Church wrote:
> Have you set velocimacro.library.autoreload = true in your velocity
> properties file?
>
> From the Velocity user guide:
> velocimacro.library.autoreload - This property controls Velocimacro library
> autoloading. The default value is false. When set to true the source
> Velocimacro library for an invoked Velocimacro will be checked for changes,
> and reloaded if necessary. This allows you to change and test Velocimacro
> libraries without having to restart your application or servlet container,
> just like you can with regular templates. This mode only works when caching
> is off in the resource loaders (e.g. file.resource.loader.cache = false ).
> This feature is intended for development, not for production.
>
> Shawn
>
> -----Original Message-----
> From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
> Sent: Thursday, December 26, 2002 3:05 PM
> To: LIST - Jakarata Velocity
> Subject: #macro not redefined by #parse of revised .vm file
>
>
> I have a .vm template file that #parse("mymacros.vm)
>
> mymacros.vm contains several #macro statements
>
> editing the macro and reloading the template that #parses it does not
> update the macro definition
>
> template reloading is turned on and revised templates are reloaded ok
>
> Is this a bug? Is there a way to have the macros redefined by #parse a
> file that contains them?
>
> Thanks
> --
> =================================================================
> = Management is doing things right; leadership is doing the =
> = right things. - Peter Drucker =
> =_______________________________________________________________=
> = http://www.sun.com/service/sunps/jdc/javacenter.pdf =
> = www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
> =================================================================
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: #macro not redefined by #parse of revised .vm file
Posted by Shawn Church <sh...@boxity.com>.
Have you set velocimacro.library.autoreload = true in your velocity
properties file?
>From the Velocity user guide:
velocimacro.library.autoreload - This property controls Velocimacro library
autoloading. The default value is false. When set to true the source
Velocimacro library for an invoked Velocimacro will be checked for changes,
and reloaded if necessary. This allows you to change and test Velocimacro
libraries without having to restart your application or servlet container,
just like you can with regular templates. This mode only works when caching
is off in the resource loaders (e.g. file.resource.loader.cache = false ).
This feature is intended for development, not for production.
Shawn
-----Original Message-----
From: Hanasaki JiJi [mailto:hanasaki@hanaden.com]
Sent: Thursday, December 26, 2002 3:05 PM
To: LIST - Jakarata Velocity
Subject: #macro not redefined by #parse of revised .vm file
I have a .vm template file that #parse("mymacros.vm)
mymacros.vm contains several #macro statements
editing the macro and reloading the template that #parses it does not
update the macro definition
template reloading is turned on and revised templates are reloaded ok
Is this a bug? Is there a way to have the macros redefined by #parse a
file that contains them?
Thanks
--
=================================================================
= Management is doing things right; leadership is doing the =
= right things. - Peter Drucker =
=_______________________________________________________________=
= http://www.sun.com/service/sunps/jdc/javacenter.pdf =
= www.sun.com | www.javasoft.com | http://wwws.sun.com/sunone =
=================================================================
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>