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 "
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

  }

  @Override
  public void setValue(FacesContext context, Object value)
  {
    throw new PropertyNotFoundException("Can't set value");
  }
View Full Code Here

  public Class<?> getType(FacesContext context) throws EvaluationException,
      PropertyNotFoundException {
    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

  public Object getValue(FacesContext context) throws EvaluationException,
      PropertyNotFoundException {
    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

  public boolean isReadOnly(FacesContext context) throws EvaluationException,
      PropertyNotFoundException {
    try {
      return expression.isReadOnly(context.getELContext());
    } catch(javax.el.PropertyNotFoundException e) {
      throw new PropertyNotFoundException(e);
    } catch (ELException e) {
      throw new EvaluationException(e);
    }
  }
View Full Code Here

      throws EvaluationException, PropertyNotFoundException {
   
    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

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.