Example usage for javax.el ELContextListener contextCreated

List of usage examples for javax.el ELContextListener contextCreated

Introduction

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

Prototype

public void contextCreated(ELContextEvent event);

Source Link

Usage

From source file:therian.Therian.java

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

        @Override/*from w  ww  . ja v a 2  s.  com*/
        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;
}