Closed glassfishrobot closed 4 years ago
@glassfishrobot Commented Reported by @edburns
@glassfishrobot Commented Issue-Links: blocks JAVASERVERFACES_SPEC_PUBLIC-1080
@glassfishrobot Commented This issue was imported from java.net JIRA UEL-29
EvaluationListener
was added in EL 3.0
In fixing JAVASERVERFACES_SPEC_PUBLIC-1080, I have found it useful to be notified when an EL expression is resolved. My particular use case is when one ELResolver in the chain wants to make assertions that are impacted by the operation of other resolvers later in the chain and in the expression.
I've added this to the ELContextImpl in JSF: {{ @Override public void setPropertyResolved(boolean resolved) { if (resolved && null != resolutionListeners) { for (ResolutionListener cur : resolutionListeners)
{ cur.propertyResolved(this); }
} super.setPropertyResolved(resolved); }
private List resolutionListeners;
public void addResolutionListener(ResolutionListener l) { if (null == resolutionListeners)
{ resolutionListeners = new ArrayList(); }
resolutionListeners.add(l); }
// ----------------------------------------------------------- Inner Classes
public interface ResolutionListener
{ public void propertyResolved(ELContext ctx); }
}}