Package javax.faces.el

Examples of javax.faces.el.PropertyNotFoundException


                        .print("  Found PropertyDescriptor " + descriptors[i]);
                return descriptors[i];
            }
        }
        System.err.print("  No property descriptor for property " + name);
        throw new PropertyNotFoundException(name);

    }
View Full Code Here


    @Override
    public Class<?> getType(FacesContext context) throws EvaluationException {
        try {
            return expression.getType(context.getELContext());
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e);
        } catch (ELException e) {
            throw new EvaluationException(e);
        }
    }
View Full Code Here

    @Override
    public Object getValue(FacesContext context) throws EvaluationException {
        try {
            return expression.getValue(context.getELContext());
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e);
        } catch (ELException e) {
            throw new EvaluationException(e);
        }
    }
View Full Code Here

    @Override
    public void setValue(FacesContext context, Object value) throws EvaluationException {
        try {
            expression.setValue(context.getELContext(), value);
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e);
        } catch (ELException e) {
            throw new EvaluationException(e);
        }
    }
View Full Code Here

            }
        }
        catch (IndexOutOfBoundsException e)
        {
            // ArrayIndexOutOfBoundsException also here
            throw new PropertyNotFoundException(
                "Expression: '" + _expressionString + "'", e);
        }
        catch (PropertyNotFoundException e)
        {
          throw e;
View Full Code Here

            throw e;
        }
        catch (IndexOutOfBoundsException e)
        {
            // ArrayIndexOutOfBoundsException also here
            throw new PropertyNotFoundException(
                "Expression: '" + _expressionString + "'", e);
        }
        catch (Exception e)
        {
            throw new EvaluationException(
View Full Code Here

        Object base = complexValue.getPrefix()
            .evaluate(variableResolver, s_functionMapper,
                ELParserHelper.LOGGER);
        if (base == null)
        {
            throw new PropertyNotFoundException("Base is null: "
                + complexValue.getPrefix().getExpressionString());
        }

        // Resolve and apply the suffixes
        List suffixes = complexValue.getSuffixes();
        int max = suffixes.size() - 1;
        for (int i = 0; i < max; i++)
        {
            ValueSuffix suffix = (ValueSuffix) suffixes.get(i);
            base = suffix.evaluate(base, variableResolver, s_functionMapper,
                ELParserHelper.LOGGER);
            if (base == null)
            {
                throw new PropertyNotFoundException("Base is null: "
                    + suffix.getExpressionString());
            }
        }

        // Resolve the last suffix
        ArraySuffix arraySuffix = (ArraySuffix) suffixes.get(max);
        Expression arraySuffixIndex = arraySuffix.getIndex();

        Object index;
        if (arraySuffixIndex != null)
        {
            index = arraySuffixIndex.evaluate(
                    variableResolver, s_functionMapper,
                    ELParserHelper.LOGGER);
            if (index == null)
            {
                throw new PropertyNotFoundException("Index is null: "
                    + arraySuffixIndex.getExpressionString());
            }
        }
        else
        {
View Full Code Here

    {
        try
        {
            if (base == null)
            {
                throw new PropertyNotFoundException(
                    "Null bean, property: " + property);
            }
            if (property == null ||
                property instanceof String && ((String)property).length() == 0)
            {
                throw new PropertyNotFoundException("Bean: "
                    + base.getClass().getName()
                    + ", null or empty property name");
            }

            if (base instanceof Map)
View Full Code Here

    {
        try
        {
            if (base == null)
            {
                throw new PropertyNotFoundException(
                    "Null bean, index: " + index);
            }

            try
            {
                if (base.getClass().isArray())
                {
                    Array.set(base, index, newValue);

                    return;
                }
                if (base instanceof List)
                {
                    // REVISIT: should we try to grow the list, if growable type
                    //          (e.g., ArrayList, etc.), and if not large
                    //          enough?
                    ((List) base).set(index, newValue);

                    return;
                }
            }
            catch (IndexOutOfBoundsException e)
            {
                throw new PropertyNotFoundException("Bean: "
                    + base.getClass().getName() + ", index " + index, e);
            }

            throw new EvaluationException(
                "Bean must be array or List. Bean: "
View Full Code Here

        try
        {
            if (base == null || property == null ||
                property instanceof String && ((String)property).length() == 0)
            {
                throw new PropertyNotFoundException("Bean is null");
            }

            if (base instanceof Map)
            {
                Object value = ((Map) base).get(property);
View Full Code Here

TOP

Related Classes of javax.faces.el.PropertyNotFoundException

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.