@Override public Object invoke(ELResolver resolver, ELContext context) { return getELResolver().getValue(getELContext(), base, property); } });
@Override public Object getValue(final Object base, final int index) throws EvaluationException, PropertyNotFoundException { return getValue(base, new Integer(index)); }
@Override public boolean isReadOnly(final Object base, final Object property) { return invokeResolver(new ResolverInvoker<Boolean>(base, property) { public Boolean invoke(ELResolver resolver, ELContext context) { return Boolean.valueOf(getELResolver().isReadOnly(getELContext(), base, property)); } }); }
@Override public void setValue(final Object base, final Object property, final Object newValue) throws EvaluationException, PropertyNotFoundException { if (base == null || property == null || isReadOnly (base, property)) { throw new PropertyNotFoundException(); } invokeResolver(new ResolverInvoker<Object>(base, property) { @Override public Object invoke(ELResolver resolver, ELContext context) { resolver.setValue(context, base, property, newValue); return null; } @Override String getMessage() { return super.getMessage() + " newValue: '" + newValue + "'"; } }); }
ELContext getELContext() { return getFacesContext().getELContext(); }
setValue(base, Integer.valueOf(index), newValue); setValue(base, Integer.valueOf(index), newValue); Array.set(base, index, getFacesContext().getApplication(). getExpressionFactory().coerceToType(newValue, baseType.getComponentType())); setValue(base, Integer.valueOf(index), newValue);
@Override public boolean isReadOnly(final Object base, final int index) { return isReadOnly(base, Integer.valueOf(index)); }
@Override public Class getType(Object base, int index) { if (base == null) throw new PropertyNotFoundException(); if (base instanceof Object[]) { if (index < 0 || index>=((Object[])base).length) { throw new PropertyNotFoundException(); } } else if (base instanceof List) { if (index < 0 || index>=((List)base).size()) { throw new PropertyNotFoundException(); } } return getType(base, new Integer(index)); }
@Override public void setValue(Object base, int index, Object newValue) throws EvaluationException, PropertyNotFoundException { if (base == null) throw new PropertyNotFoundException(); if (base instanceof Object[]) { if (index < 0 || index>=((Object[])base).length) { throw new PropertyNotFoundException(); } } else if (base instanceof List) { if (index < 0 || index>=((List)base).size()) { throw new PropertyNotFoundException(); } } setValue(base, new Integer(index), newValue); }
private final static PropertyResolver PROPERTYRESOLVER = new PropertyResolverImpl();
@Override public void setValue(final Object base, final Object property, final Object newValue) throws EvaluationException, PropertyNotFoundException { if (base == null || property == null || isReadOnly (base, property)) throw new PropertyNotFoundException(); invokeResolver(new ResolverInvoker<Object>(base, property) { @Override public Object invoke(ELResolver resolver, ELContext context) { resolver.setValue(context, base, property, newValue); return null; } @Override String getMessage() { return super.getMessage() + " newValue: '" + newValue + "'"; } }); }
ELContext getELContext() { return getFacesContext().getELContext(); }
@Override public boolean isReadOnly(final Object base, final int index) { return isReadOnly(base, Integer.valueOf(index)); }
@Override public Class getType(Object base, int index) { if (base == null) throw new PropertyNotFoundException(); if (base instanceof Object[]) { if (index < 0 || index >= ((Object[])base).length) { throw new PropertyNotFoundException(); } } else if (base instanceof List) { if (index < 0 || index >= ((List<?>)base).size()) { throw new PropertyNotFoundException(); } } return getType(base, Integer.valueOf(index)); }
@Override public void setValue(Object base, int index, Object newValue) throws EvaluationException, PropertyNotFoundException { if (base == null) throw new PropertyNotFoundException(); if (base instanceof Object[]) { if (index < 0 || index >= ((Object[])base).length) { throw new PropertyNotFoundException(); } } else if (base instanceof List) { if (index < 0 || index >= ((List<?>)base).size()) { throw new PropertyNotFoundException(); } } setValue(base, Integer.valueOf(index), newValue); }
private final static PropertyResolver PROPERTYRESOLVER = new PropertyResolverImpl();
@Override public Object invoke(ELResolver resolver, ELContext context) { return getELResolver().getValue(getELContext(), base, property); } });
@Override public boolean isReadOnly(final Object base, final Object property) { return invokeResolver(new ResolverInvoker<Boolean>(base, property) { @Override public Boolean invoke(ELResolver resolver, ELContext context) { return Boolean.valueOf(getELResolver().isReadOnly(getELContext(), base, property)); } }); }
@Override public void setValue(final Object base, final Object property, final Object newValue) throws EvaluationException, PropertyNotFoundException { if (base == null || property == null || isReadOnly (base, property)) throw new PropertyNotFoundException(); invokeResolver(new ResolverInvoker<Object>(base, property) { @Override public Object invoke(ELResolver resolver, ELContext context) { resolver.setValue(context, base, property, newValue); return null; } @Override String getMessage() { return super.getMessage() + " newValue: '" + newValue + "'"; } }); }
ELContext getELContext() { return getFacesContext().getELContext(); }