/** * Sets the value of the field using a value of the data source type. The * value given is converted to the field type and then assigned to the * field. This will update the property data source in the same way as when * {@link #setValue(Object)} is called. * * @param value * The value to set. Must be the same type as the data source. * @return this (for method chaining) * @see AbstractField#setConvertedValue(java.lang.Object) */ public default S withConvertedValue(Object value) { ((AbstractField<S>) this).setConvertedValue(value); return (S) this; }
/** * Set a value of a filter field. Note that for Date filters you need to * provide a value of {@link DateInterval} type. * * @param propertyId * Property id for which to set the value * @param value * New value * @return true if setting succeeded, false if field was not found * @throws ConversionException * exception from the underlying field */ public boolean setFilterFieldValue(Object propertyId, Object value) throws ConversionException { Component field = getColumnIdToFilterMap().get(propertyId); boolean retVal = field != null; if (field != null) { ((AbstractField<?>) field).setConvertedValue(value); } return retVal; }
/** * Set a value of a filter field. Note that for Date filters you need to * provide a value of {@link DateInterval} type. * * @param propertyId * Property id for which to set the value * @param value * New value * @return true if setting succeeded, false if field was not found * @throws ConversionException * exception from the underlying field */ public boolean setFilterFieldValue(Object propertyId, Object value) throws ConversionException { Component field = getColumnIdToFilterMap().get(propertyId); boolean retVal = field != null; if (field != null) { ((AbstractField<?>) field).setConvertedValue(value); } return retVal; }