com.sencha.gxt.data.client.editor
Class ListStoreEditor<T>
java.lang.Object
com.sencha.gxt.data.client.editor.ListStoreEditor<T>
- Type Parameters:
T - the model type in the list and the store
- All Implemented Interfaces:
- Editor<java.util.List<T>>, HasEditorDelegate<java.util.List<T>>, ValueAwareEditor<java.util.List<T>>
public class ListStoreEditor<T>
- extends java.lang.Object
- implements ValueAwareEditor<java.util.List<T>>
Binds a 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, ...);
}
}
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListStoreEditor
public ListStoreEditor(ListStore<T> store)
- Creates an editor use with a
ListStore.
- Parameters:
store - the list store that uses this editor
flush
public void flush()
- Specified by:
flush in interface ValueAwareEditor<java.util.List<T>>
getStore
public ListStore<T> getStore()
- Returns the list store that uses this editor.
- Returns:
- the list store that uses this editor.
onPropertyChange
public void onPropertyChange(java.lang.String... paths)
- Specified by:
onPropertyChange in interface ValueAwareEditor<java.util.List<T>>
setDelegate
public void setDelegate(EditorDelegate<java.util.List<T>> delegate)
- Specified by:
setDelegate in interface HasEditorDelegate<java.util.List<T>>
setValue
public void setValue(java.util.List<T> value)
- Specified by:
setValue in interface ValueAwareEditor<java.util.List<T>>
Copyright © 2012. All Rights Reserved.