Package javax.el

Examples of javax.el.FunctionMapper


    }

    public Class getType(EvaluationContext ctx)
            throws ELException {
       
        FunctionMapper fnMapper = ctx.getFunctionMapper();
       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
        return m.getReturnType();
View Full Code Here


    /**
     * Test method for {@link org.apache.tiles.el.ELContextImpl#setFunctionMapper(javax.el.FunctionMapper)}.
     */
    @Test
    public void testSetFunctionMapper() {
        FunctionMapper functionMapper = createMock(FunctionMapper.class);

        replay(resolver, functionMapper);
        context.setFunctionMapper(functionMapper);
        assertEquals(functionMapper, context.getFunctionMapper());
        verify(resolver, functionMapper);
View Full Code Here

     * Tests {@link ELContextImpl#getFunctionMapper()}.
     */
    @Test
    public void testNullFunctionMapper() {
        replay(resolver);
        FunctionMapper functionMapper = context.getFunctionMapper();
        assertNull(functionMapper.resolveFunction("whatever", "it_IT"));
        verify(resolver);
    }
View Full Code Here

    }

    public void apply(FaceletContext ctx, UIComponent parent) throws IOException, FacesException, FaceletException,
            ELException
    {
        FunctionMapper orig = ctx.getFunctionMapper();
        ctx.setFunctionMapper(new CompositeFunctionMapper(this, orig));
        try
        {
            next.apply(ctx, parent);
        }
View Full Code Here

    @Override
    public Class<?> getType(EvaluationContext ctx)
            throws ELException {
       
        FunctionMapper fnMapper = ctx.getFunctionMapper();
       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
        return m.getReturnType();
View Full Code Here

    @Override
    public Object getValue(EvaluationContext ctx)
            throws ELException {
       
        FunctionMapper fnMapper = ctx.getFunctionMapper();
       
        // quickly validate again for this request
        if (fnMapper == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.null"));
        }
        Method m = fnMapper.resolveFunction(this.prefix, this.localName);
        if (m == null) {
            throw new ELException(MessageFactory.get("error.fnMapper.method",
                    this.getOutputName()));
        }
View Full Code Here

     */
    public ExpressionBuilder(String expression, ELContext ctx)
            throws ELException {
        this.expression = expression;

        FunctionMapper ctxFn = ctx.getFunctionMapper();
        VariableMapper ctxVar = ctx.getVariableMapper();

        if (ctxFn != null) {
            this.fnMapper = new FunctionMapperFactory(ctxFn);
        }
View Full Code Here

   */
  public ExpressionBuilder(String expression, ELContext ctx)
      throws ELException {
    this.expression = expression;

    FunctionMapper ctxFn = ctx.getFunctionMapper();
    VariableMapper ctxVar = ctx.getVariableMapper();

    if (ctxFn != null) {
      this.fnMapper = new FunctionMapperFactory(ctxFn);
    }
View Full Code Here

     */
    public ExpressionBuilder(String expression, ELContext ctx)
            throws ELException {
        this.expression = expression;

        FunctionMapper ctxFn = ctx.getFunctionMapper();
        VariableMapper ctxVar = ctx.getVariableMapper();

        if (ctxFn != null) {
            this.fnMapper = new FunctionMapperFactory(ctxFn);
        }
View Full Code Here

                return elResolver;
            }

            @Override
            public FunctionMapper getFunctionMapper() {
                return new FunctionMapper() {
                    @Override
                    public Method resolveFunction(final String prefix, final String localName) {
                        return null;
                    }
                };
View Full Code Here

TOP

Related Classes of javax.el.FunctionMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.