You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
This page consists of an agenda and proposals put forth by Red Hat and its community for the Unified EL 2.1 (actually called EL 2.2) specification. Currently the Unified EL specification exists as Part II of JSR-245: JavaServer Pages 2.1.
See the expression language portion of the JSR-245 specification for information about the Unified EL.
For as long as there has been an expression language in Java EE, there has been the implicit translation in value expressions between an EL segment and the bean property getter
method on the resolved instance:
While this shorthand is certainly convenient, it's an unnecessary restriction that the EL only support this convention for accessing data of a bean instance in a value expression. In addition to this shorthand, the EL should support explicit method calls. The name of the method is taken literally if followed by brackets like a no-arguments method call in Java.
* This feature is now supported in EL 2.2
The EL syntax does not permit the use of brackets at the end of a non-root segment. On the one hand, this simplifies the EL syntax and allows an implicit translation to a concrete method. For value expressions, the EL translates non-root segments into bean property getter
methods.
In method expressions, the last segment is assumed to be a no-arguments method with the same name.
However, there are two limitations of taking this approach:
The EL would net tremendous flexibility if method arguments were supported. The rules would be simple. If brackets are used at the end of a non-root segment, the implicit translation would not take place, instance variable names used between the brackets would be used to select the proper method and the values of those instance variables would be passed into the method. The values of the method arguments would be resolved from instance variables when the expression is evaluated, just like the root segment of the expression.
* This feature is now supported in EL 2.2
As an extension to the parameterized methods feature request, it would also be convenient to have reserved
parameters for integration with event listeners. This way, the application developer could have additional parameters appended to a fixed parameter that is provided by the framework.
Parameterized methods allows:
#{bb.action(myparam)}
Which matches a method with signature such as:
public String action(String myparam) {}
But this does not cover the following case:
#{bb.valueChangeListener(myparam)}
Ideal this call would match a method with signature such as:
public void valueChangeListener(ValueChangeEvent ev, String myparam) {}
However, with parameterized method support along, it would only match a signature such as:
public void valueChangeListener(String myparam) {}
What is lost is the ValueChangeEvent, which was provided by the JSF framework as a parameter to the invoke-call in the Method-Expression instance (we will only receive the parsed parameters). So we are looking for EL to allow the framework to be able to add any number of formal type parameters at the front of the method signature.
* This feature is now supported in EL 2.2
The EL has always dealt with instance methods, but there is no reason why static methods--or even static members in general--cannot be supported. In this case, both non-static and static members are searched when resolving a method.
It would also be convenient to support direct access of public static fields as well
In both cases, the resolved base serves only to determine the class to search (rather than a specific instance).
Need first class support for Java 5 Enums constants. Either the constants should be allowed to be referenced from a base that resolves to the Enum:
or the EL should allow the fully qualified Enum class to be referenced:
The second option may be better because it doesn't require a context variable to resolve to an Enum instance just to access the other constants.
Projections are rudimentary closures that allow the dynamic creation of collections from properties of child elements:
JSR-299 is introducing several standard EL names, one of which is javax.enterprise.conversation. As you can see, the name uses the familiar namespace syntax from Java. Therefore, it would be ideal if EL could formally recognize the use of namespaces for two reasons:
Importing namespaces would allow for libraries to define standard EL names with namespace prefixes, but allow the page author the convince of using the unqualified name. The import mechanism should be a feature of the EL API and the declaration of the import be left up to the EL environment (e.g., JSF template).
Current the ELContext is created in the UI layer, either by JavaServer Faces or JSP. However, EL is an essential part of the Java EE programming model. It would make a lot more sense if the ELContext would be created at the start of the request so that components such as filters, custom servlets and third-party frameworks could access the EL. Currently, it's necessary to manually construct an EL context if an expression needs to be resolved outside of JSF or JSP.
What we are looking for is something similar to the bootstrap that was introduced for Bean Validation. Like Bean Validation, EL transcends the layers of the programming model and should therefore be universally accessible.
It's way too complicated to resolve an EL expression. If you think about it, the task is quite simple. Take an expression string and get a result. We need to make the API as simple as the task.
Part of the problem with the Unified EL is that just trying to figure out what you need to actually resolve an expression is a nightmare. It breaks down into three parts:
To evaluate an Expression, an ELContext must be provided.A real bitch.
What isn't provided is a simple API to just take an expression and get a result from it.
This could be an issue which is specific to an EL consumer, such as Facelets, but there are some concerns over the way that values are coerced by the EL. The issue is described in the following blog entry: