Java Code Examples for javax.faces.context.ExternalContext#getContext()

The following examples show how to use javax.faces.context.ExternalContext#getContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ViewScopeContainsAOPRequestScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }
 
Example 2
Source File: ViewScopeContainsSessionScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }
 
Example 3
Source File: ViewScopeContainsRequestScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }
 
Example 4
Source File: ViewScopeContainsAOPPrototypeScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }
 
Example 5
Source File: ViewScopeContainsAOPSessionScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }
 
Example 6
Source File: ViewScopeContainsPrototypeScope.java    From JSF-on-Spring-Boot with GNU General Public License v3.0 5 votes vote down vote up
@PostConstruct
  private void init() {
  	ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
      ServletContext servletContext = (ServletContext) externalContext.getContext();
WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext).
                                 getAutowireCapableBeanFactory().
                                 autowireBean(this);
  }