Example usage for javax.el ELContextEvent ELContextEvent

List of usage examples for javax.el ELContextEvent ELContextEvent

Introduction

In this page you can find the example usage for javax.el ELContextEvent ELContextEvent.

Prototype

public ELContextEvent(ELContext source) 

Source Link

Usage

From source file:org.codehaus.groovy.grails.web.pages.ext.jsp.GroovyPagesJspApplicationContext.java

ELContext createELContext(GroovyPagesPageContext pageCtx) {
    ELContext ctx = new GroovyPagesELContext(pageCtx);
    ELContextEvent event = new ELContextEvent(ctx);
    synchronized (listeners) {
        for (Iterator<ELContextListener> iter = listeners.iterator(); iter.hasNext();) {
            iter.next().contextCreated(event);
        }/*from ww w.  j a  va  2 s.co  m*/
    }
    return ctx;
}

From source file:therian.Therian.java

public TherianContext contextFor(ELContext wrapped) {
    final TherianContext result = new TherianContext(new ELContextWrapper(wrapped) {

        @Override//from  ww w . j  a v a  2  s  .c  o  m
        protected ELResolver wrap(ELResolver elResolver) {
            final CompositeELResolver compositeResolver = new CompositeELResolver();
            for (TherianModule module : modules) {
                for (ELResolver configuredELResolver : module.getElResolvers()) {
                    compositeResolver.add(configuredELResolver);
                }
            }
            compositeResolver.add(elResolver);
            return compositeResolver;
        }
    }, operatorManager);
    result.putContext(Therian.class, this);

    final ELContextEvent event = new ELContextEvent(result);
    for (TherianModule module : modules) {
        for (ELContextListener listener : module.getElContextListeners()) {
            listener.contextCreated(event);
        }
    }
    return result;
}