velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boardtc <boar...@gmail.com>
Subject Re: Using FieldMethodizer can get at con stand but not method?
Date Tue, 25 May 2010 14:10:27 GMT
Of course, I should have clarified that it was a public static.

Cheers,

Tom.

On 25 May 2010 15:02, Nathan Bubna <nbubna@gmail.com> wrote:

> returnView must also be a public method.
>
> On Tue, May 25, 2010 at 6:30 AM, boardtc <boardtc@gmail.com> wrote:
> > We are stuck with Velocity 1.4 at the moment.
> >
> > I have a java public final class ApplicationConstants  which is full of
> > final static constants, e.g. COUNT and a static string method, returnView
> > which takes a string, e.g "test". I add it to my context like
> >        context.put("ApplicationConstants", new
> > FieldMethodizer("com.myco.ApplicationConstants"));
> > In my template
> >  #set($count = $ApplicationConstants.COUNT)
> > works but
> >  #set($count = $ApplicationConstants.returnView("test"))
> > does not.
> >
> > Any advice appreciated.
> >
> > Cheers,
> >
> > Tom.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message