I'm very new to GWT and its derivative technologies, so bear with me. I need to know how to obtain a reference to an instance of the active tab or dialog Presenter using GWT Exporter. Here is a run down of why and how I am doing this:
I have a callback JavaScript function that gets called by an applet. I tried to write a native interface method to be called in place but for some reason it doesn't get called. Page consists of several IFrames and parent/child presenters (GWTP). So, as a work around, I managed to invoke a JavaScript rather than the JSNI method. From this JavaScript function, using GWT Exporter, I would like to get the instance of an active dialog and invoke a particular method, e.g.:
function jsCallBack() {
(new test.JSCallBackExporter()).callActiveDialogMethod();
}
@Export
@ExportPackage("test")
public class JSCallbackExporter implements Exportable {
public void callActiveDialogMethod() {
MainEntry.appGinJector.getMyDialogPresenter().get().MyTargetMethod();
}
However, it appears that getMyDialogPresenter().get() returns a new instance (provider) of MyDialogPresenter (which does not have the instance properties of the active dialog needed to run MyTargetMethod()). I am assuming there has to be a way to get a reference to an active dialog Presenter instance. Does anyone know how?