Package javax.faces.el

Examples of javax.faces.el.PropertyNotFoundException


    public Class getType(Object base, int index)
    {
        if (base == null)
        {
            throw new PropertyNotFoundException("Bean is null");
        }

        try
        {
            if (base.getClass().isArray())
            {
                if (base instanceof Object[] && ((Object[])base)[index] != null) {
                    Object[] array = (Object[]) base;
                    return array[index].getClass().getComponentType();
                } else {
                    return base.getClass().getComponentType();
                }
            }

            if (base instanceof List)
            {
                // REVISIT: does it make sense to do this or simply return
                //          Object.class? What if the new value is not of
                //          the old value's class?
                Object value = ((List) base).get(index);

                // REVISIT: when generics are implemented in JVM 1.5
                return (value != null) ? value.getClass() : Object.class;
            }

            // Cannot determine type, return null per JSF spec
            return null;
        }
        catch (IndexOutOfBoundsException e) {
            throw new PropertyNotFoundException("Bean: "
                + base.getClass().getName() + ", index " + index, e);
        }
        catch (Exception e)
        {
            throw new EvaluationException("Exception getting type of index " + index + " of bean with class : "
View Full Code Here


            getPropertyDescriptor(base, name);

        Method m = propertyDescriptor.getWriteMethod();
        if (m == null)
        {
            throw new PropertyNotFoundException(
                "Bean: " + base.getClass().getName() + ", property: " + name);
        }

        // Check if the concrete class of this method is accessible and if not
        // search for a public interface that declares this method
        m = MethodUtils.getAccessibleMethod(m);
        if (m == null)
        {
            throw new PropertyNotFoundException(
                "Bean: " + base.getClass().getName() + ", property: " + name + " (not accessible!)");
        }

        try
        {
View Full Code Here

            getPropertyDescriptor(base, name);

        Method m = propertyDescriptor.getReadMethod();
        if (m == null)
        {
            throw new PropertyNotFoundException(
                "Bean: " + base.getClass().getName() + ", property: " + name);
        }

        // Check if the concrete class of this method is accessible and if not
        // search for a public interface that declares this method
        m = MethodUtils.getAccessibleMethod(m);
        if (m == null)
        {
            throw new PropertyNotFoundException(
                "Bean: " + base.getClass().getName() + ", property: " + name + " (not accessible!)");
        }

        try
        {
View Full Code Here

                getPropertyDescriptor(
                    Introspector.getBeanInfo(base.getClass()), name);
        }
        catch (IntrospectionException e)
        {
            throw new PropertyNotFoundException("Bean: "
                + base.getClass().getName() + ", property: " + name, e);
        }

        return propertyDescriptor;
    }
View Full Code Here

                if (propDescriptors[i].getName().equals(propertyName))
                    return propDescriptors[i];
            }
        }

        throw new PropertyNotFoundException("Bean: "
            + beanInfo.getBeanDescriptor().getBeanClass().getName()
            + ", property: " + propertyName);
    }
View Full Code Here

            PropertyNotFoundException {
        ELContext ctx = ELAdaptor.getELContext(context);
        try {
            return this.delegate.getValue(ctx);
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e.getMessage(), e.getCause());
        } catch (ELException e) {
            throw new EvaluationException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

            throws EvaluationException, PropertyNotFoundException {
        ELContext ctx = ELAdaptor.getELContext(context);
        try {
            this.delegate.setValue(ctx, value);
        } catch (PropertyNotWritableException e) {
            throw new PropertyNotFoundException(e.getMessage(), e.getCause());
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e.getMessage(), e.getCause());
        } catch (ELException e) {
            throw new EvaluationException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

            PropertyNotFoundException {
        ELContext ctx = ELAdaptor.getELContext(context);
        try {
            return this.delegate.isReadOnly(ctx);
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e.getMessage(), e.getCause());
        } catch (ELException e) {
            throw new EvaluationException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

            PropertyNotFoundException {
        ELContext ctx = ELAdaptor.getELContext(context);
        try {
            return this.delegate.getType(ctx);
        } catch (javax.el.PropertyNotFoundException e) {
            throw new PropertyNotFoundException(e.getMessage(), e.getCause());
        } catch (ELException e) {
            throw new EvaluationException(e.getMessage(), e.getCause());
        }
    }
View Full Code Here

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