View Full Version : store.load / store.save ?

17 Dec 2009, 3:16 AM

Here is my process to put datas from database in the grid when it's displayed :

protected ListLoader getLoader() {
BeanModelReader reader;
RpcProxy proxy;

myServiceAsync = Registry.get("myServiceAsync");
proxy = new RpcProxy<List<MyPOJO>>() {
public void load(final Object loadConfig, final AsyncCallback<List<FoodType>> callback) {

reader = new BeanModelReader();
loader = new BaseListLoader(proxy, reader);
return loader;

store = new ListStore<BeanModel>(loader)();
Grid<BeanModel> myGrid = new Grid<BeanModel>(store, cm);
myGrid.addListener(Events.Attach, new Listener<BaseEvent>() {
public void handleEvent(final BaseEvent be) {
All is ok to load my datas from database and display it in the grid thus translation POJO -> beanModel is automatic.

Now I would like save the modified values without make the translation BeanModel -> POJO by myself.

Doesn't a sort of "store.save()" exist ? What's the best way to save my store's datas ?