> I've got an object that I expose to my view via getModel.  That object 
> has a typical "public static final" constant...
> 
>   public static final String firstName_KEY = "firstName";
> 
> Note that I purposefully don't provide a static getter (I don't want to 
> have to write getters for all my constants).
> 
> Can I access that from my FreeMarker view?
> 

I don't know if it is the best solution, but you have access to OGNL from 
Freemarker view. 

So for example:

<#if someVariable = stack.findValue('@[EMAIL PROTECTED]')>

<#-- Some code -->

</#if>

and it works in my tags.
If you need access to static methods from OGNL you will need to set probably 
struts property 'struts.ognl.allowStaticMethodAccess' to true.

-- 
Mateusz Nowakowski



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to