[S2] OGNL and enum

2008-06-23 Thread Pierre Thibaudeau
It is possible to refer to an enum value within OGNL: [EMAIL PROTECTED]@MARS} But how can I refer to the collection of all the values of an enum? In Java, that would be: com.myapp.Planets.values() With OGNL, I tried the following without success: [EMAIL PROTECTED]@values()} [EMAIL PROTECTED]@val

Re: [S2] OGNL and enum

2008-06-23 Thread Jeromy Evans
Pierre Thibaudeau wrote: It is possible to refer to an enum value within OGNL: [EMAIL PROTECTED]@MARS} But how can I refer to the collection of all the values of an enum? In Java, that would be: com.myapp.Planets.values() With OGNL, I tried the following without success: [EMAIL PROTECTED]@valu

Re: [S2] OGNL and enum

2008-06-23 Thread Pierre Thibaudeau
> You'll need to enable OGNL's access to static methods. > > struts.ognl.allowStaticMethodAccess=true > Ah, I didn't know that! > > I try not to use this myself. Instead I expose a property that provides > the values so it can sort, lookup I81N text, and minimize dependencies on > OGNL-specifi