Refine search
@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"); } } } }
/** * If the base object is a ResourceBundle, throw a * {@link PropertyNotWritableException}. * * @param context * The context of this evaluation. * @param base * The ResourceBundle to be modified. Only bases that are of type * ResourceBundle are handled. * @param property * The String property to use. * @param value * The value to be set. * @throws NullPointerException * if context is <code>null</code>. * @throws PropertyNotWritableException * Always thrown if base is an instance of ReasourceBundle. */ public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException(); } if (base instanceof ResourceBundle) { context.setPropertyResolved(true); throw new PropertyNotWritableException( "ResourceBundles are immutable"); } }
@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"); } } } }
context.setPropertyResolved(base, property); throw new PropertyNotWritableException(); throw new PropertyNotWritableException();
throw new PropertyNotWritableException("resolver is read-only"); node.putNull(property.toString()); context.setPropertyResolved(true);
context.setPropertyResolved(base, property); if (isReadOnly) { throw new PropertyNotWritableException();
context.setPropertyResolved(base, property); int index = toInteger(property); if (isReadOnly) { throw new PropertyNotWritableException(); throw new PropertyNotWritableException(); } catch (IndexOutOfBoundsException ex) { throw new PropertyNotFoundException();
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;
public void setValue(ELContext elContext, Object base, Object property, Object value) { if (base instanceof Action) { elContext.setPropertyResolved(true); throw new PropertyNotWritableException("The Action cannot be set with an expression."); } } }
public void setValue(ELContext elContext, Object base, Object property, Object value) { if (base == null && REQUEST_CONTEXT_VARIABLE_NAME.equals(property)) { elContext.setPropertyResolved(true); throw new PropertyNotWritableException("The RequestContext cannot be set with an expression."); } }
/** * If the base object is a ResourceBundle, throw a * {@link PropertyNotWritableException}. * * @param context * The context of this evaluation. * @param base * The ResourceBundle to be modified. Only bases that are of type * ResourceBundle are handled. * @param property * The String property to use. * @param value * The value to be set. * @throws NullPointerException * if context is <code>null</code>. * @throws PropertyNotWritableException * Always thrown if base is an instance of ReasourceBundle. */ public void setValue(ELContext context, Object base, Object property, Object value) { if (context == null) { throw new NullPointerException(); } if (base instanceof ResourceBundle) { context.setPropertyResolved(true); throw new PropertyNotWritableException( "ResourceBundles are immutable"); } }
context.setPropertyResolved(true); Map map = (Map) base; if (isReadOnly || map.getClass() == theUnmodifiableMapClass) { throw new PropertyNotWritableException(); throw new PropertyNotWritableException();
public void setValue(ELContext context, Object base, Object property, Object value) { RequestContext requestContext = getRequestContext(); if (base != null || requestContext == null) { return; } if (ImplicitVariables.matches(property)) { context.setPropertyResolved(true); throw new PropertyNotWritableException("The implicit flow variable " + property + " is not writable."); } }
@Override public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException { if (base == null) { String beanName = property.toString(); BeanFactory bf = getBeanFactory(elContext); if (bf.containsBean(beanName)) { if (value == bf.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"); } } } }
context.setPropertyResolved(true); List list = (List) base; int index = toInteger(property); if (isReadOnly) { throw new PropertyNotWritableException(); throw new PropertyNotWritableException(); } catch (IndexOutOfBoundsException ex) { throw new PropertyNotFoundException();
context.setPropertyResolved(true); if (isReadOnly) { throw new PropertyNotWritableException();
throw new PropertyNotWritableException( ELUtil.getExceptionMessageString(context, "resolverNotwritable", Method method = bp.getWriteMethod(); if (method == null) { throw new PropertyNotWritableException( ELUtil.getExceptionMessageString(context, "propertyNotWritable", context.setPropertyResolved(true); } catch (ELException ex) { throw ex;
public void setValue(ELContext context, Object value) { context.setPropertyResolved(false); throw new PropertyNotWritableException(); }
public void setValue(ELContext elContext, Object base, Object property, Object value) { if (base instanceof Action) { elContext.setPropertyResolved(true); throw new PropertyNotWritableException("The Action cannot be set with an expression."); } } }
public void setValue(ELContext context, Object value) { context.setPropertyResolved(false); throw new PropertyNotWritableException(); }