velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: Acccessing static member-vars
Date Tue, 11 Apr 2006 14:01:00 GMT
right now, Velocity doesn't allow field access, static or otherwise.

There is a tool/wrapper somewhere called the FieldMethodizer which *may* 
allow static access...

geir

Dominik Bruhn wrote:
> Hy,
> I got the following Class:
> =========
> public class Permission {
> 	public static int P_SHOWBOARD=0;
> 	public static int P_CREATETHREAD=1;
> 	public static int P_REPLY=2;
> }
> =========
> 
> How can I Access these Properties in a Velocity-Template.
> 
> I tried:
> context.put("Permission",Permission.class);
> 
> and
> <h1>$Permission.PERM_SHOWBOARD</h1>
> 
> But this didn't work.
> 
> How can help?
> 
> Thanks
> TO
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message