Refine search
throw new PropertyNotWritableException( ELUtil.getExceptionMessageString(context, "resolverNotwritable", Method method = bp.getWriteMethod(); if (method == null) { throw new PropertyNotWritableException( ELUtil.getExceptionMessageString(context, "propertyNotWritable", context.setPropertyResolved(base, property); } catch (ELException ex) { throw ex; } catch (InvocationTargetException ite) { throw new ELException(ite.getCause()); } catch (Exception ex) { if (null == val) { new Object[] { property.toString(), base.getClass().getName(), val }); throw new ELException(message, ex);
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException( "Legacy VariableResolver wrapped, not writable"); } if (!context.isPropertyResolved()) { elResolver.setValue(context, base, property, value); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ResourceBundle) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof List<?>) { context.setPropertyResolved(base, property); @SuppressWarnings("unchecked") // Must be OK to cast to Object List<Object> list = (List<Object>) base; if (this.readOnly) { throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } int idx = coerce(property); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ELClass && property instanceof String) { Class<?> clazz = ((ELClass) base).getKlass(); String name = (String) property; throw new PropertyNotWritableException(Util.message(context, "staticFieldELResolver.notWriteable", name, clazz.getName())); } }
context.setPropertyResolved(base, property); int index = toInteger(property); if (isReadOnly) { throw new PropertyNotWritableException(); throw new PropertyNotWritableException(); } catch (IndexOutOfBoundsException ex) { throw new PropertyNotFoundException(); } catch (ClassCastException ex) { throw ex;
/** * <p>Set the value of a scoped object for the specified name.</p> * * @param context <code>ELContext</code> for evaluating this value * @param base Base object against which this evaluation occurs * (must be null because we are evaluating a top level variable) * @param property Property name to be accessed * @param value New value to be set */ public void setValue(ELContext context, Object base, Object property, Object value) { if (base != null) { return; } if (property == null) { throw new PropertyNotFoundException("No property specified"); } FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class); ResourceBundle bundle = fcontext.getApplication().getResourceBundle(fcontext, property.toString()); if (bundle != null) { context.setPropertyResolved(true); throw new PropertyNotWritableException(property.toString()); } }
context.setPropertyResolved(true); throw new PropertyNotFoundException(fieldName); else if (_isReadOnly || prop.getWriteMethod() == null) throw new PropertyNotWritableException(fieldName); writeMethod.invoke(base, value); } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { throw new ELException(e.getCause());
@Override public void setValue(ELContext elContext, @Nullable Object base, Object property, Object value) throws ELException { if (base == null) { String beanName = property.toString(); WebApplicationContext wac = getWebApplicationContext(elContext); if (wac.containsBean(beanName)) { if (value == wac.getBean(beanName)) { // Setting the bean reference to the same value is alright - can simply be ignored... elContext.setPropertyResolved(true); } else { throw new PropertyNotWritableException( "Variable '" + beanName + "' refers to a Spring bean which by definition is not writable"); } } } }
public void setValue(ELContext context, Object value) { try { this.orig.setValue(context, value); } catch (PropertyNotFoundException pnfe) { throw new PropertyNotFoundException(this.attr + ": " + pnfe.getMessage(), pnfe.getCause()); } catch (PropertyNotWritableException pnwe) { throw new PropertyNotWritableException(this.attr + ": " + pnwe.getMessage(), pnwe.getCause()); } catch (ELException e) { throw new ELException(this.attr + ": " + e.getMessage(), e.getCause()); } }
@Override public void setValue(ELContext context, Object value) { try { wrapped.setValue(context, value); } catch (PropertyNotFoundException pnfe) { throw new PropertyNotFoundException(tagAttribute + ": " + pnfe.getMessage(), pnfe); } catch (PropertyNotWritableException pnwe) { throw new PropertyNotWritableException(tagAttribute + ": " + pnwe.getMessage(), pnwe); } catch (ELException e) { throw new ELException(tagAttribute + ": " + e.getMessage(), e); } }
public void setValue(ELContext context, Object base, Object property, Object value) throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException { if ((base == null) && (property == null)) throw new PropertyNotFoundException(); if (!(property instanceof String)) return; ResourceBundle bundle = getResourceBundle(context, (String)property); if (bundle != null) { throw new PropertyNotWritableException("ResourceBundles are read-only"); } }
public void setValue(ELContext ctx, Object base, Object property, Object value) throws PropertyNotFoundException, PropertyNotWritableException, ELException { if (ctx == null) throw new IllegalArgumentException(); if (base == null) { ctx.setPropertyResolved(true); throw new PropertyNotWritableException(); } if (!ctx.isPropertyResolved()) DEFAULT.setValue(ctx, base, property, value); }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { throw new PropertyNotWritableException("Cannot write: " + property + ", as security expressions are read-only"); }
public void setValue(FacesContext context, Object value) throws EvaluationException, PropertyNotFoundException { ELContext ctx = context.getELContext(); 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()); } }
public JspPropertyNotWritableException(String mark, PropertyNotWritableException e) { super(mark + " " + e.getMessage(), e.getCause()); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base == null) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(MESSAGES.legacyVariableResolver()); } if (!context.isPropertyResolved()) { elResolver.setValue(context, base, property, value); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ResourceBundle) { context.setPropertyResolved(base, property); throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof List<?>) { context.setPropertyResolved(base, property); @SuppressWarnings("unchecked") // Must be OK to cast to Object List<Object> list = (List<Object>) base; if (this.readOnly) { throw new PropertyNotWritableException(Util.message(context, "resolverNotWriteable", base.getClass().getName())); } int idx = coerce(property); try { list.set(idx, value); } catch (UnsupportedOperationException e) { throw new PropertyNotWritableException(e); } catch (IndexOutOfBoundsException e) { throw new PropertyNotFoundException(e); } } }
@Override public void setValue(ELContext context, Object base, Object property, Object value) { Objects.requireNonNull(context); if (base instanceof ELClass && property instanceof String) { Class<?> clazz = ((ELClass) base).getKlass(); String name = (String) property; throw new PropertyNotWritableException(Util.message(context, "staticFieldELResolver.notWriteable", name, clazz.getName())); } }