Difference between $ and # in ADF/JSF/JSP

Posted by pavan.pvj on Oracle Blogs See other posts from Oracle Blogs or by pavan.pvj
Published on Fri, 07 Jan 2011 12:44:38 +0530 Indexed on 2011/01/07 9:56 UTC
Read the original article Hit count: 464

Filed under:
|
|
Found this one interesting. So, picked it from one of the books and posting here.

JSP 2.1 and JSF 1.2 - both of them use a unified Expression language. One major and the most obvious difference is between $ and #. JSP 2.1 uses $ and JSF 1.2 uses # in an EL. 

$ - immediate evaluation
# - deferred evaluation

$ - $ syntax executes expressions eagerly/immediately, which means that the result is returned immediately when the page renders.

# - # syntax defers the expression evaluation to a point defined by the implementing technology. In general, JSF uses deferred EL evaluation because of its multiple lifecycle phases in which events are handled. To ensure the model is prepared before the values are accessed by EL, it must defer EL evaluation until the appropriate point in the life cycle.

Note: This is picked up from Oracle Fusion Developer Guide (ISBN: 9780071622547). There is also a very good article here:
http://java.sun.com/products/jsp/reference/techart/unifiedEL.html


© Oracle Blogs or respective owner

Related posts about General

Related posts about Oracle SOA