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

[jsr372-experts] TagValueExpression and getValueReference

From: arjan tijms <arjan.tijms_at_gmail.com>
Date: Thu, 30 Jun 2016 19:17:17 +0200

 <https://java.net/jira/browse/JAVASERVERFACES-4096>Hi,

Although this is practically speaking more of an implementation issue, I'd
like to discuss it here anyway since both Mojarra and MyFaces have the same
problem.

In EL 2.2 ValueExpression had a new method added; getValueReference

TagValueExpression however was never updated to implement this, so the
default implementation of the ValueExpression it inherits from gets used,
which just returns null.

Effectively, the getValueReference feature can not be used in JSF because
of this and e.g. Mojarra has to keep using its own ValueExpressionAnalyzer.
OmniFaces too had to assume it can't simply use
ValueExpression#getValueReference and had to come up with its own
workaround.

There are some existing issues filed that are related to this, e.g.
<https://java.net/jira/browse/JAVASERVERFACES-4096>
<https://java.net/jira/browse/JAVASERVERFACES-4096>
<https://java.net/jira/browse/JAVASERVERFACES-4096>
<https://java.net/jira/browse/JAVASERVERFACES-4096>
<https://java.net/jira/browse/JAVASERVERFACES-4096>
https://java.net/jira/browse/JAVASERVERFACES-4096

Since this method has not been implemented for such a long time I wonder if
anyone has anything against just implementing it, and perhaps additionally
asking for a TCK test to be added for this.

Thoughts?

Kind regards,
Arjan Tijms