void com.delbardpro.production.web.parametres.article.modifier.ChargerFormForm.setAgeBackingList(Collection items, String valueProperty, String labelProperty)
Convenient method to quickly set the value and label backinglist for the age property. This method takes a collection of objects, as well as the property names to query on these objects in order to find the corresponding values and labels.
Let's say you have a set of value objects with the following properties:
id
code
name
description
But you need to populate the age backing list with the id properties as the values and the name properties as the labels then you would make a call like this: setAgeBackingList(valueObjects, "id", "name")
This method knows how to handle primitive property types as it simply delegates to org.apache.commons.beanutils.PropertyUtils.getProperty(Object, String).
See Also:
getAge()
getAgeValueList()
getAgeLabelList()
getAgeLabelList()
Parameters:
items The items from which to read the properties, if this argument is null this method will simply clear the existing values and labels
valueProperty the name of the property to query on each object to retrieve the corresponding value, cannot be null
Throws:
java.lang.IllegalArgumentException if the valueProperty or labelProperty is null
java.lang.RuntimeException if one of the items in the collection is null, or if the caller does not have access one of the object's properties, if an exception was thrown while accessing a property or if the property does not exist on at least one of the items
Partager