Package javax.el

Examples of javax.el.PropertyNotFoundException


    private final static Long ZERO = new Long(0L);

    public final static void throwUnhandled(Object base, Object property)
            throws ELException {
        if (base == null) {
            throw new PropertyNotFoundException(MessageFactory.get(
                    "error.resolver.unhandled.null", property));
        } else {
            throw new PropertyNotFoundException(MessageFactory.get(
                    "error.resolver.unhandled", base.getClass(), property));
        }
    }
View Full Code Here


        {
            return this.orig.getValueReference(context);
        }
        catch (PropertyNotFoundException pnfe)
        {
            throw new PropertyNotFoundException(this.attr + ": " + pnfe.getMessage(), pnfe.getCause());
        }
        catch (ELException e)
        {
            throw new ELException(this.attr + ": " + e.getMessage(), e.getCause());
        }
View Full Code Here

                }
                result = pc.getPageNumber() + 1; // RF data table is 1-based, our PageControl is 0-based
            } else if ("unlimited".equals(lowerCaseMethodName)) {
                result = view.isUnlimited();
            } else {
                throw new PropertyNotFoundException("The " + methodName
                    + " property of a PageControl object is not accessible");
            }

            // don't let other resolvers touch this
            context.setPropertyResolved(true);
View Full Code Here

                }

                // don't let other resolvers touch this
                context.setPropertyResolved(true);
            } else {
                throw new PropertyNotFoundException("The " + methodName
                    + " property of a PageControl object can not be set, only pageSize");
            }
        }
    }
View Full Code Here

  private Object get(Object property) throws PropertyNotFoundException {
    if (map.containsKey(property)) {
      return map.get(property);
    }
    throw new PropertyNotFoundException("Cannot find property " + property);
  }
View Full Code Here

      return null;
    }
    context.setPropertyResolved(false);
    Object result = context.getELResolver().getValue(context, base, property);
    if (!context.isPropertyResolved()) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", property, base));
    }
    return result;
  }
View Full Code Here

    if (!lvalue) {
      return null;
    }
    Object base = prefix.eval(bindings, context);
    if (base == null) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
    Object property = getProperty(bindings, context);
    if (property == null && strict) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base));
    }
    context.setPropertyResolved(false);
    Class<?> result = context.getELResolver().getType(context, base, property);
    if (!context.isPropertyResolved()) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", property, base));
    }
    return result;
  }
View Full Code Here

    if (!lvalue) {
      return true;
    }
    Object base = prefix.eval(bindings, context);
    if (base == null) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
    Object property = getProperty(bindings, context);
    if (property == null && strict) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base));
    }
    context.setPropertyResolved(false);
    boolean result = context.getELResolver().isReadOnly(context, base, property);
    if (!context.isPropertyResolved()) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", property, base));
    }
    return result;
  }
View Full Code Here

    if (!lvalue) {
      throw new ELException(LocalMessages.get("error.value.set.rvalue"));
    }
    Object base = prefix.eval(bindings, context);
    if (base == null) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
    Object property = getProperty(bindings, context);
    if (property == null && strict) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base));
    }
    context.setPropertyResolved(false);
    context.getELResolver().setValue(context, base, property, value);
    if (!context.isPropertyResolved()) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", property, base));
    }
  }
View Full Code Here

  }
 
  public MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
    Object base = prefix.eval(bindings, context);
    if (base == null) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
    Object property = getProperty(bindings, context);
    if (property == null && strict) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.method.notfound", "null", base));
    }
    String name = bindings.convert(property, String.class);
    Method method = findMethod(name, base.getClass(), returnType, paramTypes);
    return new MethodInfo(method.getName(), method.getReturnType(), paramTypes);
  }
View Full Code Here

TOP

Related Classes of javax.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.