E
- entity typepublic class MapEntityOptions<E extends Entity> extends MapOptions<E> implements Options<E>, EntityOptions<E>
EntityOptions.ValueChangeEvent<T>
Options.OptionsChangeEvent<T>
DataUnit.StateChangeEvent
Modifier and Type | Field and Description |
---|---|
protected E |
selectedItem |
options
Constructor and Description |
---|
MapEntityOptions(java.util.Map<java.lang.String,E> options) |
Modifier and Type | Method and Description |
---|---|
com.haulmont.bali.events.Subscription |
addValueChangeListener(java.util.function.Consumer<EntityOptions.ValueChangeEvent<E>> listener) |
boolean |
containsItem(E item) |
com.haulmont.chile.core.model.MetaClass |
getEntityMetaClass() |
E |
getSelectedItem() |
void |
refresh()
Refreshes the source moving it to the
BindingState.ACTIVE state |
void |
setSelectedItem(E item)
Set current item in the source.
|
void |
updateItem(E item)
Update an item in the collection if it is already there.
|
addOptionsChangeListener, addStateChangeListener, getItemsCollection, getOptions, getState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addOptionsChangeListener, getOptions
addStateChangeListener, getState
public MapEntityOptions(java.util.Map<java.lang.String,E> options)
public void setSelectedItem(E item)
EntityOptions
setSelectedItem
in interface EntityOptions<E extends Entity>
item
- the item to setpublic E getSelectedItem()
public boolean containsItem(E item)
containsItem
in interface EntityOptions<E extends Entity>
public void updateItem(E item)
EntityOptions
updateItem
in interface EntityOptions<E extends Entity>
public void refresh()
EntityOptions
BindingState.ACTIVE
staterefresh
in interface EntityOptions<E extends Entity>
public com.haulmont.bali.events.Subscription addValueChangeListener(java.util.function.Consumer<EntityOptions.ValueChangeEvent<E>> listener)
addValueChangeListener
in interface EntityOptions<E extends Entity>
public com.haulmont.chile.core.model.MetaClass getEntityMetaClass()
getEntityMetaClass
in interface EntityDataUnit
MetaClass
of an entity contained in the source