More often than not, I use an accessor on the backing bean.

public String getSomeConstant()
{
   return SOME_CONSTANT;
}

#{someBean.someConstant}

On Tue, Nov 24, 2009 at 6:07 PM, laredotornado <[email protected]> wrote:
>
> Hi,
>
> I'm using MyFaces 1.1.6 and Tomahawk 1.1.9.  I have a public static final
> int constant in a certain class, and I would like to be able to access that
> value in my JSF page using JSF code.  I was curious what mechanisms you sue
> to do that.
>
> The only informative article I found on the subject is here --
> http://java_rzanner.blogspot.com/2006/09/usage-of-constant-values-in-jsp-code.html,
> which discusses creating a map of constants and putting them into the
> application scope via a ServletContextListener.  If you know of a more
> straightforward way, please let me know.
>
> Thanks, - Dave
>
> --
> View this message in context: 
> http://old.nabble.com/How-do-you-access-public-static-final-values-in-your-JSF-app--tp26504910p26504910.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Reply via email to