Package javax.faces.el

Examples of javax.faces.el.ReferenceSyntaxException


            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

            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

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

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

        {
            Object expression = parser.ExpressionString();
            if (!(expression instanceof Expression)
                && !(expression instanceof ExpressionString))
            {
                throw new ReferenceSyntaxException("Invalid expression: '"
                    + expressionString
                    + "'. Parsed Expression of unexpected type "
                    + expression.getClass().getName());
            }

            replaceSuffixes(expression);

            return expression;
        }
        catch (ParseException e)
        {
            String msg = "Invalid expression: '" + expressionString + "'";
            throw new ReferenceSyntaxException(msg, e);
        }
    }
View Full Code Here

        // Loop through quoted strings
        for (;;)
        {
            if (i >= len)
            {
                throw new ReferenceSyntaxException(
                    "Missing closing brace. Expression: '" + expressionString
                        + "'");
            }

            int indexofClosingBrace = expressionString.indexOf('}', i);
            i = StringUtils.minIndex(indexofClosingBrace, findQuote(
                expressionString, i));

            if (i < 0)
            {
                // No delimiter found
                throw new ReferenceSyntaxException(
                    "Missing closing brace. Expression: '" + expressionString
                        + "'");
            }

            // 1. If quoted literal, find closing quote
            if (i != indexofClosingBrace)
            {
                i = indexOfMatchingClosingQuote(expressionString, i) + 1;
                if (i == 0)
                {
                    // Note: if no match, i==0 because -1 + 1 = 0
                    throw new ReferenceSyntaxException(
                        "Missing closing quote. Expression: '"
                            + expressionString + "'");
                }
            }
            else
View Full Code Here

        Integer integer = Coercions.coerceToInteger(index, LOGGER);
        if (integer != null)
        {
            return integer;
        }
        throw new ReferenceSyntaxException(
            "Cannot convert index to int for base " + base.getClass().getName()
                + " and index " + index);
    }
View Full Code Here

                // Note: ArrayIndexOutOfBoundsException also here
                return null;
            }

            throw new ReferenceSyntaxException("Must be array or List. Bean with class: "
                + base.getClass().getName() + ", index " + index);
        }
        catch (RuntimeException e)
        {
            if(log.isDebugEnabled())
View Full Code Here

    public Object resolveVariable(FacesContext facesContext, String name)
    {
        if ((name == null) || (name.length() == 0))
        {
            throw new ReferenceSyntaxException("Varible name is null or empty");
        }

        // Implicit objects
        Object implicitObject = _implicitObjects.get(name);
        if (implicitObject != null)
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.