|
|
|
|
|
|
| Re: JSF with Eclipse - Tutorial [message #476108 is a reply to message #476064] |
Fri, 14 November 2008 17:23   |
Cameron Bateman Messages: 480 Registered: July 2009 |
Senior Member |
|
|
> 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
|
|
|
|
| Re: JSF with Eclipse - Tutorial [message #618731 is a reply to message #476061] |
Thu, 13 November 2008 07:47  |
Wolfgang Knauf Messages: 60 Registered: July 2009 |
Member |
|
|
Hi Lars,
good tutorial!
Some minor things:
1.5 Value and Method Binding:
"Tip: Expression Language statements either start with "${" or "#{" and end with
"}" " => could you explain the difference beetween "$" and "#" (I know that
there is one, but I don't know it myself ;-) )
3.3. Download the JSTL library
"If you know where I find the standard JSTL1.2 reference implementation please
email this information to me." => there is no separate download, it seems to be
part of the JavaEE5 RI (http://java.sun.com/javaee/downloads/index.jsp). I found
it also as part of JBoss 5.
4.4. Create Java Server Page
Image and code snippet seem to be swapped (correct: first image, then code)
5.4. Validators
I miss the implementation of the "validate" (with check for login="tester").
5.5. Resource bundle for messages -> typo in file name: "message.properites"
Best regards
Wolfgang
|
|
|
|
|
|
|
| Re: JSF with Eclipse - Tutorial [message #618736 is a reply to message #476064] |
Fri, 14 November 2008 17:23  |
Cameron Bateman Messages: 480 Registered: July 2009 |
Senior Member |
|
|
> 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02140 seconds