What is FacesContext used for?

前端 未结 4 973
甜味超标
甜味超标 2021-02-03 20:41

What is FacesContext used for?

And where exactly is it implemented?

4条回答
  •  佛祖请我去吃肉
    2021-02-03 21:34

    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. It is passed to, and potentially modified by, each phase of the request processing lifecycle.

    A FacesContext instance is associated with a particular request at the beginning of request processing, by a call to the getFacesContext() method of the FacesContextFactory instance associated with the current web application. The instance remains active until its release() method is called, after which no further references to this instance are allowed. While a FacesContext instance is active, it must not be referenced from any thread other than the one upon which the servlet container executing this web application utilizes for the processing of this request.

    reference:

    http://docs.oracle.com/javaee/6/api/javax/faces/context/FacesContext.html

提交回复
热议问题