richard.hallier
2 Sep 2008, 6:48 AM
Code example below
final RpcProxy<ListLoadConfig, ListLoadResult<Propriete>> proxy = ...
final ListLoader<ListLoadConfig> loader = new ...
final ListStore<BeanModel> store = new ...
final Combobox<BeanModel> cb = new ...
cb.setStore(store);
...
BeanModel v = ... // Init value for the combobox
cb.setValue(v);
RENDERING NOW...
Now when rendering occurs, everything is ok, the combobox is well displayed and init value selected.
The problem appears when we do :
cb.getValue()
Without user clicking on the combobox, the returned value is NULL !
I guess it's because the store is not still loaded.
But if I want to take advantage of the lazy loading of the store (when the user doesn't click the combobox), is it possible to provide the correct initial value (that passed to the setValue method) ? By detecting the store was not loaded?
Cheers
Richard
final RpcProxy<ListLoadConfig, ListLoadResult<Propriete>> proxy = ...
final ListLoader<ListLoadConfig> loader = new ...
final ListStore<BeanModel> store = new ...
final Combobox<BeanModel> cb = new ...
cb.setStore(store);
...
BeanModel v = ... // Init value for the combobox
cb.setValue(v);
RENDERING NOW...
Now when rendering occurs, everything is ok, the combobox is well displayed and init value selected.
The problem appears when we do :
cb.getValue()
Without user clicking on the combobox, the returned value is NULL !
I guess it's because the store is not still loaded.
But if I want to take advantage of the lazy loading of the store (when the user doesn't click the combobox), is it possible to provide the correct initial value (that passed to the setValue method) ? By detecting the store was not loaded?
Cheers
Richard