Previous Section  < Day Day Up >  Next Section

B.2 Variables

Variables are named references to data (objects) that are created by the application or declared as managed beans in the faces-config.xml file, and implicitly created by the EL. Every object that is available as a request, session or application attribute can be used as an EL variable

#{aVariable}

B.2.1 Implicit Variables

All information about a request and other data can be accessed through the EL implicit variables:

Variable name

Description

requestScope

A collection (a java.util.Map) of all request scope variables.

sessionScope

A collection (a java.util.Map) of all session scope variables.

applicationScope

A collection (a java.util.Map) of all application scope variables.

param

A collection (a java.util.Map) of all request parameter values as a single String value per parameter.

paramValues

A collection (a java.util.Map) of all request parameter values as a String array per parameter.

header

A collection (a java.util.Map) of all request header values as a single String value per header.

headerValues

A collection (a java.util.Map) of all request header values as a String array per header.

cookie

A collection (a java.util.Map) of all request cookie values as a single javax.servlet.http.Cookie value per cookie. See Appendix D for a list of properties for the Cookie class.

initParam

A collection (a java.util.Map) of all application initialization parameter values as a single String value per parameter.

facesContext

An instance of the javax.faces.context.FacesContext class, providing access to various JSF context data.

view

An instance of the javax.faces.component.UIViewRoot class, providing access to all components in the current view.

Support for additional implicit variables can be implemented through a custom javax.faces.el.VariableResolver class. See Appendix D for details.

    Previous Section  < Day Day Up >  Next Section