|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.data.util.PropertysetItem
com.vaadin.data.util.BeanItem<BT>
public class BeanItem<BT>
A wrapper class for adding the Item interface to any Java Bean.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.vaadin.data.Item |
---|
Item.Editor, Item.PropertySetChangeListener, Item.PropertySetChangeNotifier, Item.Viewer |
Constructor Summary | |
---|---|
BeanItem(BT bean)
Creates a new instance of BeanItem and adds all properties
of a Java Bean to it. |
|
BeanItem(BT bean,
java.util.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,
java.lang.String[] propertyIds)
Creates a new instance of BeanItem and adds all listed
properties of a Java Bean to it - in specified order. |
Method Summary | |
---|---|
void |
addNestedProperty(java.lang.String nestedPropertyId)
Adds a nested property to the item. |
void |
expandProperty(java.lang.String propertyId,
java.lang.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. |
Methods inherited from class com.vaadin.data.util.PropertysetItem |
---|
addItemProperty, addListener, addPropertySetChangeListener, clone, equals, getItemProperty, getItemPropertyIds, getListeners, hashCode, removeItemProperty, removeListener, removePropertySetChangeListener, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public 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, java.util.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, java.lang.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.Method Detail |
---|
public void expandProperty(java.lang.String propertyId, java.lang.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(java.lang.String nestedPropertyId)
nestedPropertyId
- property id to add. This property must not exist in the item
already and must of of form "field1.field2" where field2 is a
field in the object referenced to by field1public BT getBean()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |