- JavaBeans components
- Collections
- Java SE enumerated types
- Implicit object
What are Expression Language Implicit Objects?
JSF framework provides several objects related to current request being processed and/or execution environment. These objects aka Implicit Objects can be accessed at runtime in a facelet or backing bean using EL. Although you can access implicit objects using EL and JEE Servlet API as well, having predefined objects comes in handy.
Here is a handy reference of JSF Implicit Objects:
JSF 2.x Expression Language (EL) Implicit Objects
- facesContext: an instance of FacesContext. FacesContext contains all of the per-request state information related to the processing of a single JavaServer Faces request, and the rendering of the corresponding response.
- application: an instance of the ServletContext. A ServletContext instance provides access to the execution environment i.e. the servlet container.
- initParam: A Map of the initialization parameters of this web application.
- session: an instance of HttpSession. A HttpSession can be used to bind objects, get information about a session, such as the session identifier, creation time, and last accessed time. Session information is scoped only to the current web application (ServletContext), so information stored in one context will not be directly visible in another
- view: The current UIViewRoot for this view. UIViewRoot is the UIComponent that represents the root of the UIComponent tree.
- component: The UIComponent instance being currently processed at the time of evaluation.
- cc: The top-level composite component currently being processed.
- request: an instance of HttpServletRequest.
- applicationScope: A Map (name and value) of all application scope attributes.
- sessionScope: A Map (name and value) of all attributes in the current session.
- viewScope: A Map (name and value) of all attributes in the current view scope.
- requestScope: A Map (name and value) of all attributes in the current request being processed.
- flowScope:*
#{flowScope}
, for flow local storage. This maps tofacesContext.getApplication().getFlowHandler().getCurrentFlowScope()
. - flash: A Map for forwarding temporary objects between the user/next views generated by the faces lifecycle or the current view using #{falsh.now} (see flash.putNow( ..)).
- param: A Map (name and value) of HTTP request parameters, containing only the first value for each name.
- paramValues: A Map of HTTP request parameters, yielding a String[] array of all values for a given name.
- header: A Map of HTTP header parameters for the current request.
- headerValues: A Map of HTTP header parameters for the current request, yielding a String[] array of all values for a given name.
- cookie: A Map of the cookie names and values of the current request.
- resource: A Map of application resources.
- pageContext ${pageContext.request.contextPath}
Expression Language (EL) Operators
Operator | Description Symbol Operator |
---|---|
and
|
Logical And &&
|
or
|
Logical OR ||
|
le
|
Relational less than or equal to <=
|
ge
|
Relational greater than or equal to >=
|
lt
|
Relational less than <
|
gt
|
Relational greater than >
|
null
|
Null literal
|
empty
|
To determine whether a value is null or empty.
|
mod
|
Arithmetic operator modulo %
|
not
|
Logical Opposite !
|
div
|
Arithmetic operator division /
|
eq
|
Equal to ==
|
ne
|
Not equal to !=
|
instanceof
|
Java Keyword, is object an instance of the
given class? |
true
|
Boolean true
|
false
|
Boolean false
|
All the above operators are reserved for the EL and should not be used as identifiers
The precedence of operators highest to lowest, left to right is as follows:
- [] .
- () (used to change the precedence of operators)
- - (unary) not ! empty
- * / div % mod
- + - (binary)
- < > <= >= lt gt le ge
- == != eq ne
- && and
- || or
- ? :
Thank you so much. Clear and Direct. Much Thanks. Love your Blog.
ReplyDeleteIt helped me so many time. Thanks
ReplyDeleteGood read. Thanks for sharing it!
ReplyDeleteMáy lạnh Daikin
thank you for sharing
ReplyDeletevery good website thanks for sharining hyperion training institute
ReplyDeleteibm integration bus training institute
ibm message broker training institute
ibm message queue training institute
informatica data quality training institute
informatica mdm training institute
informatica training institute
Really thanks for posting such an useful and informative stuff...
ReplyDeleteiib tutorial
Thanks for posting such an useful and informative stuff...
ReplyDeleteinformatica online training
Forex Signals, MT4 and MT5 Indicators, Strategies, Expert Advisors, Forex News, Technical Analysis and Trade Updates in the FOREX IN WORLD
ReplyDeleteForex Signals Forex Strategies Forex Indicators Forex News Forex World
ReplyDeleteI am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly.i want to share about websphere online training .
may lanh Gree noi tieng TQ
ReplyDeletemay lanh Reetech
may lanh Funiki
may lanh Midea
may lanh Toshiba
may lanh Casper
may lanh Nagakawa
may lanh Yuiki
Electro smart television is a more used product in middle class families in Bangladesh. It ensures your eye health protection, reduces electricity and super speedy ram and processor 2500GB expandable memory super glossy panel USB HDMI CCTV VGA port Warranty 08 years papers Wireless mouse usable & boxes with the good sound system.
ReplyDeleteHello All !
ReplyDeleteI am a seoer in HCM VN
My bussiness supply Air conditioning and install them for office house
I come here to study the new knowledge
this topic is very nice
ReplyDeletegreat idea!
ReplyDeletemáy lạnh giấu trần daikin giá rẻ