/** * Publishes a {@link javax.faces.event.PostConstructApplicationEvent} event for the current * {@link Application} instance. */ void publishPostConfigEvent() { FacesContext ctx = FacesContext.getCurrentInstance(); Application app = ctx.getApplication(); if (null == ((InitFacesContext) ctx).getELContext()) { ELContext elContext = new ELContextImpl(app.getELResolver()); elContext.putContext(FacesContext.class, ctx); ExpressionFactory exFactory = ELUtils.getDefaultExpressionFactory(ctx); if (null != exFactory) { elContext.putContext(ExpressionFactory.class, exFactory); } UIViewRoot root = ctx.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); } } ((InitFacesContext) ctx).setELContext(elContext); } app.publishEvent(ctx, PostConstructApplicationEvent.class, Application.class, app); }
((InitFacesContext) ctx).setELContext(elContext);
initContext.setELContext(elContext); Application application = initContext.getApplication();
((InitFacesContext) ctx).setELContext(elContext);
((InitFacesContext)ctx).setELContext(elContext);
initContext.setELContext(elContext); Application application = initContext.getApplication();
initContext.setELContext(elContext); Application application = initContext.getApplication();
initContext.setELContext(elctx); Application app = initContext.getApplication(); app.publishEvent(initContext,
elctx.putContext(ExpressionFactory.class, exFactory); initContext.setELContext(elctx); if (associate != null) { associate.setContextName(getServletContextIdentifier(context));
initContext.setELContext(elContext);
initContext.setELContext(elContext);
initContext.setELContext(elContext);