Package javax.faces.el

Examples of javax.faces.el.ReferenceSyntaxException


        }

        // Do not trim(), we support mixed string-bindings
        if ((expression == null) || (expression.length() == 0))
        {
            throw new ReferenceSyntaxException("Expression: empty or null");
        }
        _application = application;
        _expressionString  = expression;

        _expression = s_expressionCache.get(expression);
View Full Code Here


                    .containsKey(name))
                {
                    String errorMessage =
                        "Cannot set value of implicit object '"
                        + name + "' for expression '" + _expressionString + "'";
                    throw new ReferenceSyntaxException(errorMessage);
                }

                // Note: will be coerced later
                setValueInScope(facesContext, name, newValue);
            }
View Full Code Here

        checkEmpty(reference, "reference");

        // TODO: this check should be performed by the expression factory. It is a requirement of the TCK
        if (!(reference.startsWith("#{") && reference.endsWith("}")))
        {
            throw new ReferenceSyntaxException("Invalid method reference: '" + reference + "'");
        }

        if (params == null)
            params = new Class[0];

        MethodExpression methodExpression;

        try
        {
            methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
                    Object.class, params);
        }
        catch (ELException e)
        {
            throw new ReferenceSyntaxException(e);
        }

        return new MethodExpressionToMethodBinding(methodExpression);
    }
View Full Code Here

        {
            valueExpression = getExpressionFactory().createValueExpression(threadELContext(), reference, Object.class);
        }
        catch (ELException e)
        {
            throw new ReferenceSyntaxException(e);
        }

        return new ValueExpressionToValueBinding(valueExpression);
    }
View Full Code Here

        }
        this.ref = ref;
        int period = ref.lastIndexOf(".");
        if (period < 0)
        {
            throw new ReferenceSyntaxException(ref);
        }
        vb = application.createValueBinding(ref.substring(0, period));
        name = ref.substring(period + 1);
        if (name.length() < 1)
        {
            throw new ReferenceSyntaxException(ref);
        }

    }
View Full Code Here

        if (names.size() < 2)
        {
            if ("applicationScope".equals(name) || "requestScope".equals(name)
                    || "sessionScope".equals(name))
            {
                throw new ReferenceSyntaxException("Cannot set '" + name + "'");
            }
            Map map = econtext().getRequestMap();
            if (map.containsKey(name))
            {
                map.put(name, value);
View Full Code Here

            names.add(0, expr.toString());
        }

        if (names.size() < 1)
        {
            throw new ReferenceSyntaxException("No expression in '" + ref + "'");
        }
        for (int i = 0; i < names.size(); i++)
        {
            String name = (String) names.get(i);
            if (name.length() < 1)
            {
                throw new ReferenceSyntaxException("Invalid expression '" + ref
                        + "'");
            }
        }
        return (names);
View Full Code Here

        // TODO: this check should be performed by the expression factory. It is
        // a requirement of the TCK
        if (!(reference.startsWith("#{") && reference.endsWith("}")))
        {
            throw new ReferenceSyntaxException("Invalid method reference: '" + reference + "'");
        }

        if (params == null)
        {
            params = new Class[0];
        }

        MethodExpression methodExpression;

        try
        {
            methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
                                                                             Object.class, params);
        }
        catch (ELException e)
        {
            throw new ReferenceSyntaxException(e);
        }

        return new MethodExpressionToMethodBinding(methodExpression);
    }
View Full Code Here

            valueExpression = getExpressionFactory().createValueExpression(
                    threadELContext(), reference, Object.class);
        }
        catch (ELException e)
        {
            throw new ReferenceSyntaxException(e);
        }

        return new ValueExpressionToValueBinding(valueExpression);
    }
View Full Code Here

        // TODO: this check should be performed by the expression factory. It is
        // a requirement of the TCK
        if (!(reference.startsWith("#{") && reference.endsWith("}")))
        {
            throw new ReferenceSyntaxException("Invalid method reference: '" + reference + "'");
        }

        if (params == null)
        {
            params = new Class[0];
        }

        MethodExpression methodExpression;

        try
        {
            methodExpression = getExpressionFactory().createMethodExpression(threadELContext(), reference,
                                                                             Object.class, params);
        }
        catch (ELException e)
        {
            throw new ReferenceSyntaxException(e);
        }

        return new MethodExpressionToMethodBinding(methodExpression);
    }
View Full Code Here

TOP

Related Classes of javax.faces.el.ReferenceSyntaxException

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.