Package javax.faces.el

Examples of javax.faces.el.PropertyNotFoundException


            }
        }
        catch (IndexOutOfBoundsException e)
        {
            // ArrayIndexOutOfBoundsException also here
            throw new PropertyNotFoundException(
                "Expression: '" + _expressionString + "'", e);
        }
        catch (EvaluationException 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

                          + "'");
            }
            return (((DynaActionForm) base).getMap());
        } else if (base instanceof DynaBean) {
            if (getDynaProperty((DynaBean) base, name.toString()) == null) {
                throw new PropertyNotFoundException(name.toString());
            }
            Object value = ((DynaBean) base).get(name.toString());
            if (log.isTraceEnabled()) {
                log.trace("Returning dynamic property '" + name +
                          "' for DynaBean '" + base + "' value '" +
View Full Code Here

        if ((base == null) || (name == null)) {
            throw new NullPointerException();
        } else if ((base instanceof DynaActionForm) &&
                   ("map".equals(name))) {
            throw new PropertyNotFoundException(name.toString());
        } else if (base instanceof DynaBean) {
            if (log.isTraceEnabled()) {
                log.trace("setting dynamic property '" + name +
                          "' for DynaBean '" + base +
                          "' to '" + value + "'");
            }
            if (getDynaProperty((DynaBean) base, name.toString()) == null) {
                throw new PropertyNotFoundException(name.toString());
            }
            ((DynaBean) base).set(name.toString(), value);
        } else {
            if (log.isTraceEnabled()) {
                log.trace("Delegating set of property '" + name +
View Full Code Here

        } else if ((base instanceof DynaActionForm) &&
                   ("map".equals(name))) {
            return (true);
        } else if (base instanceof DynaBean) {
            if (getDynaProperty((DynaBean) base, name.toString()) == null) {
                throw new PropertyNotFoundException(name.toString());
            }
            return (false);
        } else {
            return (resolver.isReadOnly(base, name.toString()));
        }
View Full Code Here

            DynaProperty dynaProperty =
                getDynaProperty((DynaBean) base, name.toString());
            if (dynaProperty != null) {
                return (dynaProperty.getType());
            } else {
                throw new PropertyNotFoundException(name.toString());
            }
        } else {
            return (resolver.getType(base, name));
        }
    }
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 with class : "
                    + 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("Base with class : "
                    + base.getClass().getName() + ", index " + index, e);
            }

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

    {
        try
        {
            if (base == null)
            {
                throw new PropertyNotFoundException("Base bean is null.");
            }
            else if (property == null)
            {
                throw new PropertyNotFoundException("Property name is null.");
            }
            else if (property instanceof String && ((String)property).length() == 0)
            {
                throw new PropertyNotFoundException("Property name is an empty String.");
            }

            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.