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]@values()}
[EMAIL PROTECTED]@values}
[EMAIL PROTECTED]()}
You'll need to enable OGNL's access to static methods.

struts.ognl.allowStaticMethodAccess=true

Otherwise your approach is fine. 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-specific syntax.


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

Reply via email to