struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: Can I access static member variable from application scope object?
Date Wed, 10 Dec 2008 17:56:22 GMT
And make static property names all upper-case, in keeping with Java style.

Those reading your code will thank you (after the naming change, anyway).

--- On Wed, 12/10/08, Nils-Helge Garli Hegvik <nilsga@gmail.com> wrote:
> From: Nils-Helge Garli Hegvik <nilsga@gmail.com>
> Check the section about accessing static properties at
> http://struts.apache.org/2.0.14/docs/ognl-basics.html
> 
> On Wed, Dec 10, 2008 at 6:27 PM, Burton Rhodes wrote:
> > I hope this isn't a "basic java"
> question, but I am having a hard time
> > figuring out why I can't access a static member
> variable from a class
> > in the application scope in my jsp file.  Really
> appreacite any help!
> >
> >
> > ---- JSP excerpt below -------
> >
> > <!-- This work because
> "xactionStatusLookups" is a NON-STATIC member
> > variable -->
> > <s:select
> > name="searchCriteria.xactionStatusId"
> >
> list="%{#application['scMyAppProperties'].xactionStatusLookups}"
> > listKey="xactionStatusId"
> > listValue="name"
> > />
> >
> > <!-- This DOES NOT work because
> "xactionStatusLookups" is a STATIC
> > member variable -->
> > <s:select
> > name="searchCriteria.xactionSourceId"
> >
> list="%{#application['scMyAppProperties'].xactionSourceLookups}"
> > listKey="xactionSourceId"
> > listValue="name"
> > />
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org

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


Mime
View raw message