-
1. Re: Why does Expression Language with an inner enum not return a value?
jamezp Dec 12, 2016 2:29 PM (in response to arthurborsboom)I've reopened [WFLY-6939] Usage of static fields from java.lang classes as EL expressions in JSPs doesn't work - JBoss Issue Tracker . This looks like it needs another look.
--
James R. Perkins
-
2. Re: Why does Expression Language with an inner enum not return a value?
arthurborsboom Jan 4, 2017 1:26 PM (in response to jamezp)Hi James,
Has there been any progress on this matter?
-
3. Re: Why does Expression Language with an inner enum not return a value?
jamezp Jan 4, 2017 1:29 PM (in response to arthurborsboom)No sorry. I haven't had a chance to look at it yet. Maybe I can have a look today though.
--
James R. Perkins
-
4. Re: Why does Expression Language with an inner enum not return a value?
jamezp Jan 4, 2017 2:59 PM (in response to arthurborsboom)Arthur,
I had a chance to look into this finally. I didn't see anything specific in the spec (JSR-341) that stated anything about inner classes. However looking at the EL implementation it doesn't look like it would work. The javax.el.ImportHandler uses Class.forName() to resolve the type. This requires the fully qualified class name which for an enclosed object would be something like MyConstants$BusinessObject.CALENDAR. The problem is you can use a $ in an import so I don't think it will work.
In short it looks like if you want to use constants or enums they need to be top-level objects.
--
James R. Perkins
-
5. Re: Why does Expression Language with an inner enum not return a value?
arthurborsboom Jan 4, 2017 3:21 PM (in response to jamezp)Thanks for giving it a thought.
I will give it a try later (upcoming weeks) on another Java Application Server, for example Weblogic, Websphere, Glassfish or Tomcat (whichever I get my hands on first).
If you come up with another idea, I am all ears.
-
6. Re: Why does Expression Language with an inner enum not return a value?
jamezp Jan 4, 2017 3:52 PM (in response to arthurborsboom)Excellent. If it works on another server please let me know. WildFly uses the RI so it should behave the same on GlassFish.
--
James R. Perkins