When I access my Form directly via URL the first time e.g. Browser refresh on http://localhost:8080/aero2/index.jsp?gwt.codesvr=127.0.0.1:9997#ChildForm
I always get the following error, on any subsequent access to the form e.g. via @Page reference, it works OK:
00:12:04,438 [ERROR] ParentService:
java.lang.RuntimeException: There are no proxy providers registered yet. at org.jboss.errai.bus.client.framework.RemoteServiceProxyFactory.getRemoteProxy(RemoteServiceProxyFactory.java:37) at org.jboss.errai.ioc.client.api.builtin.CallerProvider$1.call(CallerProvider.java:51) at at.tfr.aero2.client.ChildForm.init(ChildForm.java:93)
this is a sample of the code
@Inject
@DataField
private ListBox parents;
@PostConstruct
public void init() {
try {
GWT.log("calling parentService");
parentService.call(
new RemoteCallback<List<WrappedParent>>() {
@Override
public void callback(List<WrappedParent> response) {
GWT.log("found Parents: "+response);
ChildForm.this.loadParents(response);
}
},
new ErrorCallback() {
@Override
public boolean error(Message message, Throwable throwable) {
GWT.log("ParentService: ", throwable);
Window.alert(message.toString());
return false;
}
}).getAll();
} catch (Exception e) {
GWT.log("ParentService: ", e);
}
}
public void loadParents(List<WrappedParent> parentSet) {
GWT.log("loadParents: "+parentSet.size());
for (WrappedParent p : parentSet) {
parents.addItem(p.toString(), p.getId().toString());
}
parents.setVisible(true);
parents.setVisibleItemCount(1);
}
Errai Version 2.2.0.CR2
Thanks,
Thomas