[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools.jsf] Re: JSF with Eclipse - Tutorial

I found this article about the "Unified EL":
http://java.sun.com/products/jsp/reference/techart/unifiedEL.html
If I find the time to read it, it will hopefully remove the fog in my There seems to be more about it than just deferred evaluation.

In JSP 2.0 and before the main difference is, as you say, early vs. late-bound compilation. ${} is resolved when the JSP page is compiled into Java. #{} is not resolved until the compiled Java for a JSP is executed.


So the expression: bean.foo

When it's in ${bean.foo}, the variable 'bean' must be defined when the JSP page is compiled. You can think of this as similar to variables in Java.

When it's in #{bean.foo}, the variable bean need not be defined until runtime. That's why it is used in JSF, since JSF injects things into the runtime that JSP doesn't know about at compile time, like managed beans.

In JSP 2.1 (Faces 1.2), Unified EL created a separate standard for EL. In the new standard, the meaning of $ vs. # is left to the implementer. However, I believe in the JSP context the meaning is the same. On the other hand, in something like Facelets all EL is "late-bound" regardless of $ or #.


--Cam