Hi,
On 15/12/05, Diogo Quintela (EF) <[EMAIL PROTECTED]> wrote:
> > What you need to do here is something along the lines of the
> > following, in your plugin class:
> >
> > public Date getSomeDate() {
> > return new Date();
> > }
> >
> > and in your velocity to template, you'll be able to access this date
> > with ${someDate}
>
> Gregory,
> You mean $plugin.someDate should refer to getSomeDate in plugin object.
> plugin in normally put into the context as I referred before.
>
Opps, yes indeed. I'm getting rusty ;-)
On 15 Dec 2005 14:25:39 -0000, karthik Guru <[EMAIL PROTECTED]> wrote:
> I believe velocity tools is like any other class and just needs to be
> instantiated and added to the context to use it. If you want to use one of
> the velocity tools in the project , place it in the class path and then can
> you verify if the following helps?
As a general rule, (which doesn't apply here, since it seems Stefan's
plugin is meant to be private?), I think it might be a good idea to
avoid adding dependencies on plugin when they're not vital... and I
don't think velocity tools is vital to add a timestamp in generated
line-comments ;)
Cheers,
g