jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] EL 3.0 static fields for java.lang.* package not implemented in Facelets

From: Bauke Scholtz <balusc_at_gmail.com>
Date: Thu, 8 Oct 2015 10:33:01 +0200

Hi,

As per EL 3.0 spec chapter 1.22.1 (
http://download.oracle.com/otn-pub/jcp/el-3_0-fr-eval-spec/EL3.0.FR.pdf),
classes of java.lang.* package are implicitly imported in EL scope. This
works for JSP like so ${Boolean.TRUE}, but not for Facelets like so
#{Boolean.TRUE}.

Was that done awarely or is this just an oversight in Facelets?

Nonetheless, in the line of OmniFaces <o:importConstants>, I'd imagine that
a new Facelet taghandler like <ui:importConstants> utilizing this EL 3.0
feature would be very useful, particularly for enums and like.

Cheers, B