Example usage for javax.el ResourceBundleELResolver ResourceBundleELResolver

List of usage examples for javax.el ResourceBundleELResolver ResourceBundleELResolver

Introduction

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

Prototype

public ResourceBundleELResolver() 

Source Link

Usage

From source file:com.github.htfv.maven.plugins.buildconfigurator.core.el.BuildConfiguratorELResolver.java

/**
 * Creates a new instance of EL resolver which may be used for expression
 * evaluation. Returned resolver includes not only
 * {@code BuildConfiguratorELResolver}, but also all standard resolvers.
 *
 * @param mavenProject//from   ww w . j  a  va  2  s.co m
 *            reference to the configured Maven project. Used to resolve
 *            properties referenced in EL expressions.
 * @param configuration
 *            loaded property files.
 *
 * @return new instance of EL resolver.
 */
public static ELResolver newInstance(final MavenProject mavenProject, final Configuration configuration) {
    final CompositeELResolver elResolver = new CompositeELResolver();

    elResolver.add(new BuildConfiguratorELResolver(mavenProject, configuration));
    elResolver.add(new ArrayELResolver());
    elResolver.add(new ListELResolver());
    elResolver.add(new MapELResolver());
    elResolver.add(new ResourceBundleELResolver());

    //
    // BeanELResolver should be the last one.
    //

    elResolver.add(new BeanELResolver());

    return elResolver;
}

From source file:org.apache.camel.language.juel.JuelExpression.java

/**
 * Factory method to create the EL context
 *//*from w ww . j  ava 2 s .c  om*/
protected ELContext createContext() {
    ELResolver resolver = new CompositeELResolver() {
        {
            //add(methodResolver);
            add(new ArrayELResolver(false));
            add(new ListELResolver(false));
            add(new MapELResolver(false));
            add(new ResourceBundleELResolver());
            add(new BeanAndMethodELResolver());
        }
    };
    return new SimpleContext(resolver);
}

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

public GroovyPagesJspApplicationContext() {
    elResolver.add(new ImplicitObjectELResolver());
    elResolver.add(additionalResolvers);
    elResolver.add(new MapELResolver());
    elResolver.add(new ResourceBundleELResolver());
    elResolver.add(new ListELResolver());
    elResolver.add(new ArrayELResolver());
    elResolver.add(new BeanELResolver());
    elResolver.add(new ScopedAttributeELResolver());
}

From source file:org.tinygroup.jspengine.runtime.PageContextImpl.java

private ELResolver getELResolver() {

    if (elResolver == null) {
        // Create a CompositeELResolver
        CompositeELResolver celResolver = new CompositeELResolver();

        celResolver.add(new ImplicitObjectELResolver());
        // Add ELResolvers registered in JspApplicationContext
        JspApplicationContextImpl jaContext = getJspApplicationContext();
        Iterator<ELResolver> it = jaContext.getELResolvers();
        while (it.hasNext()) {
            celResolver.add(it.next());//from w  w  w  .j  av  a2  s .  c  o m
        }
        celResolver.add(new MapELResolver());
        celResolver.add(new ResourceBundleELResolver());
        celResolver.add(new ListELResolver());
        celResolver.add(new ArrayELResolver());
        celResolver.add(new BeanELResolver());
        celResolver.add(new ScopedAttributeELResolver());
        elResolver = celResolver;
    }
    return elResolver;
}