DaRkViDe
7 Dec 2010, 4:05 AM
This question can appear very stupid...
I need to load a single object (Bean) from server side without go through the controller and view but directly on the panel that displays the object!
I loaded a lot of list of objects with rpc proxy, reader and loader and all works fine
I need to load this object synchronously, is it possible?
This example can be totally wrong...it was just to get an idea of what i need to do...
If i use an rpc proxy like the following metod:
public MyModel reloadMyModel() {
final MyModelServiceAsync MyModeloService = Registry
.get(Abi.MyModel_SERVICE);
RpcProxy<MyModel> MyModelProxy = new RpcProxy<MyModel>() {
@Override
protected void load(Object loadConfig,
AsyncCallback<MyModel> callback) {
//this method return a single object
//it works fine via cotroller and view
MyModelService.getMyModel(param, callback);
}
};
BaseLoader<MyModel> l = new BaseLoader<MyModel>(MyModelProxy);
l.load();
//PROBLEM: how to set the result of the loader on the object?
MyModel m = ??????
//return the object updated
return m;
}
Anywone helps???
I need to load a single object (Bean) from server side without go through the controller and view but directly on the panel that displays the object!
I loaded a lot of list of objects with rpc proxy, reader and loader and all works fine
I need to load this object synchronously, is it possible?
This example can be totally wrong...it was just to get an idea of what i need to do...
If i use an rpc proxy like the following metod:
public MyModel reloadMyModel() {
final MyModelServiceAsync MyModeloService = Registry
.get(Abi.MyModel_SERVICE);
RpcProxy<MyModel> MyModelProxy = new RpcProxy<MyModel>() {
@Override
protected void load(Object loadConfig,
AsyncCallback<MyModel> callback) {
//this method return a single object
//it works fine via cotroller and view
MyModelService.getMyModel(param, callback);
}
};
BaseLoader<MyModel> l = new BaseLoader<MyModel>(MyModelProxy);
l.load();
//PROBLEM: how to set the result of the loader on the object?
MyModel m = ??????
//return the object updated
return m;
}
Anywone helps???