/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws IllegalArgumentException if a nested reference to a * property returns null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws IllegalArgumentException if a nested reference to a * property returns null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
/** * Set the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions. * * @param bean Bean whose property is to be modified * @param name Possibly indexed and/or nested name of the property * to be modified * @param value Value to which this property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found */ public void setProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { setNestedProperty(bean, name, value); }
private void setModelValue(MODEL_VALUE_TYPE value) throws ConversionException { try { propertyUtils.setNestedProperty(model, propertyExpression, value); } catch (Exception e) { throw new ConversionException("Failed to retrieve property from object", e); } }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception IllegalArgumentException if a nested reference to a * property returns null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception IllegalArgumentException if a nested reference to a * property returns null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws IllegalArgumentException if a nested reference to a * property returns null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(final Object bean, final String name, final Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
/** * <p>Sets the value of the (possibly nested) property of the specified * name, for the specified bean, with no type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be modified * @param name Possibly nested name of the property to be modified * @param value Value to which the property is to be set * * @exception IllegalAccessException if the caller does not have * access to the property accessor method * @exception IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @exception IllegalArgumentException if a nested reference to a * property returns null * @exception InvocationTargetException if the property accessor method * throws an exception * @exception NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#setNestedProperty */ public static void setNestedProperty(Object bean, String name, Object value) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { PropertyUtilsBean.getInstance().setNestedProperty(bean, name, value); }
public void setValue(Object dataObject, Object value) { PropertyUtilsBean utils = BeanUtilsBean.getInstance().getPropertyUtils(); try { utils.setNestedProperty(dataObject, getName(), value); } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { throw new IllegalStateException("cannot access field " + getName() + " for " + dataObject.getClass().getName(), e); } }
public void flushModelToUI() { try { bridge.setUIValue(ui, convertForward(getModelValue())); // Load "full" object from ui listmodel into model if (ui.getClass().equals(JComboBox.class)) { JComboBox c = (JComboBox) ui; int idx = c.getSelectedIndex(); if (idx > -1) { Object o = c.getModel().getElementAt(idx); propertyUtils.setNestedProperty(model, propertyExpression, o); } } } catch (Exception ignored) { } }
Class type = bean.getPropertyType(m_baseObject, m_baseObjectProperty); value = converter.convert(m_value, type); bean.setNestedProperty(m_baseObject, m_baseObjectProperty, value); setError(null); } catch (InvocationTargetException e) {
Class<?> type = bean.getPropertyType(m_baseObject, m_baseObjectProperty); value = converter.convert(m_value, type); bean.setNestedProperty(m_baseObject, m_baseObjectProperty, value); setError(null); } catch (InvocationTargetException e) {