Ejemplo n.º 1
0
 /** @see javax.faces.context.FacesContext#getELContext() */
 @Override
 public ELContext getELContext() {
   assertNotReleased();
   if (elContext == null) {
     Application app = getApplication();
     elContext = new ELContextImpl(app.getELResolver());
     elContext.putContext(FacesContext.class, this);
     UIViewRoot root = this.getViewRoot();
     if (null != root) {
       elContext.setLocale(root.getLocale());
     }
     ELContextListener[] listeners = app.getELContextListeners();
     if (listeners.length > 0) {
       ELContextEvent event = new ELContextEvent(elContext);
       for (ELContextListener listener : listeners) {
         listener.contextCreated(event);
       }
     }
   }
   return elContext;
 }