com.extjs.gxt.ui.client.data
Class BeanModel

java.lang.Object
  extended by com.extjs.gxt.ui.client.data.BaseModelData
      extended by com.extjs.gxt.ui.client.data.BaseModel
          extended by com.extjs.gxt.ui.client.data.BeanModel
All Implemented Interfaces:
ChangeEventSource, Model, ModelData, java.io.Serializable

public class BeanModel
extends BaseModel

A ModelData instance that wraps a bean.

Nested beans are supported when creating BeanModel instances with limited support for nested lists of beans. Any child lists must be defined with java.util.List and must be paramertized with a BeanModelTag class or subclass.

When working with bean models, avoid settting beans as values, rather, set the wrapping bean model instance.


 private List numbers;
 

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.extjs.gxt.ui.client.data.ChangeEventSource
Add, Remove, Update
 
Method Summary
<X> X
getBean()
          Returns the bean.
 java.util.Collection<java.lang.String> getPropertyNames()
          Returns an collection of the model's property names.
 java.lang.String toString()
           
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModel
addChangeListener, addChangeListener, notify, remove, removeChangeListener, removeChangeListeners, set, setSilent
 
Methods inherited from class com.extjs.gxt.ui.client.data.BaseModelData
get, get, getProperties, isAllowNestedValues, setAllowNestedValues, setProperties
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.extjs.gxt.ui.client.data.ModelData
get, getProperties
 

Method Detail

getBean

public <X> X getBean()
Returns the bean.

Returns:
the bean

getPropertyNames

public java.util.Collection<java.lang.String> getPropertyNames()
Description copied from interface: ModelData
Returns an collection of the model's property names.

The collection should be a snapshot of the property names that the model represents.

Changes to the returned collection should not mutate this model instance.

Specified by:
getPropertyNames in interface ModelData
Overrides:
getPropertyNames in class BaseModelData

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object