public class BeanItem<BT> extends PropertysetItem
Item.Editor, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer| Constructor and Description |
|---|
BeanItem(BT bean)
Creates a new instance of
BeanItem and adds all properties
of a Java Bean to it. |
BeanItem(BT bean,
Class<BT> beanClass)
Creates a new instance of
BeanItem and adds all properties
of a Java Bean to it. |
BeanItem(BT bean,
Collection<?> propertyIds)
Creates a new instance of
BeanItem and adds all listed
properties of a Java Bean to it - in specified order. |
BeanItem(BT bean,
String... propertyIds)
Creates a new instance of
BeanItem and adds all listed
properties of a Java Bean to it - in specified order. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNestedProperty(String nestedPropertyId)
Adds a nested property to the item.
|
void |
expandProperty(String propertyId,
String... subPropertyIds)
Expands nested bean properties by replacing a top-level property with
some or all of its sub-properties.
|
BT |
getBean()
Gets the underlying JavaBean object.
|
addItemProperty, addListener, addPropertySetChangeListener, clone, equals, getItemProperty, getItemPropertyIds, getListeners, hashCode, removeItemProperty, removeListener, removePropertySetChangeListener, toStringpublic BeanItem(BT bean)
Creates a new instance of BeanItem and adds all properties
of a Java Bean to it. The properties are identified by their respective
bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is and
are methods are not supported.
bean - the Java Bean to copy properties from.public BeanItem(BT bean, Class<BT> beanClass)
Creates a new instance of BeanItem and adds all properties
of a Java Bean to it. The properties are identified by their respective
bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is and
are methods are not supported.
bean - the Java Bean to copy properties from.beanClass - class of the beanpublic BeanItem(BT bean, Collection<?> propertyIds)
Creates a new instance of BeanItem and adds all listed
properties of a Java Bean to it - in specified order. The properties are
identified by their respective bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is and
are methods are not supported.
bean - the Java Bean to copy properties from.propertyIds - id of the property.public BeanItem(BT bean, String... propertyIds)
Creates a new instance of BeanItem and adds all listed
properties of a Java Bean to it - in specified order. The properties are
identified by their respective bean names.
Note : This version only supports introspectable bean properties and
their getter and setter methods. Stand-alone is and
are methods are not supported.
bean - the Java Bean to copy properties from.propertyIds - ids of the properties.public void expandProperty(String propertyId, String... subPropertyIds)
propertyId - property id for the property whose sub-properties are to be
expanded,subPropertyIds - sub-properties to expand, all sub-properties are expanded if
not specifiedpublic void addNestedProperty(String nestedPropertyId)
nestedPropertyId - property id to add.public BT getBean()
Copyright © 2016 Vaadin Ltd. All rights reserved.