T
- the model type in the list and the storepublic class ListStoreEditor<T> extends Object
ListStore
to a List
property in the edited model object. When flushed,
the list property will contain the current visible items in the store and all of the changes
made to the items.
If bound to a null value, no changes will be made when flushed.
This will not collect subeditor paths, as the Store and whatever it is bound to are not treated like sub-editors.
public interface MyData {
List<Person> getPeople();
}
public class MyDataEditor implements Editor<MyData>{
private ListStore<Person> peopleStore = new ListStore<Person>(...);
private Grid<Person> peopleGrid;
ListStoreEditor<Person> people;//declare a sub editor
public MyDataEditor() {
peopleStore = new ListStore<Person>(...); //create the real store
people = new ListStoreEditor<Person>(peopleStore);//map to it with an editor
grid = new Grid<Person>(peopleStore, ...);
}
}
Constructor and Description |
---|
ListStoreEditor(ListStore<T> store)
Creates an editor use with a
ListStore . |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
ListStore<T> |
getStore()
Returns the list store that uses this editor.
|
void |
onPropertyChange(String... paths) |
void |
setDelegate(<any> delegate) |
void |
setValue(List<T> value) |
Copyright © 2018. All rights reserved.