Please can I ask for assistance with the following.
We are using iDempiere Release-2.0:
1. How do I get the currently selected tab (that is, the tab which invoked the process), and requery the data in the tab, from within the doIt() method of a SvrProcess?
2. How do I implement the following code, from within the doIt() method of a SvrProcess, which used to work in Release-1.0c:
boolean continueSubmit = FDialog.ask(0, null, "Do you want to continue?");
I now receive the error: "Components can be accessed only in event listeners".
I implemented a static helper method which provides a callback (please see the method a little further down). The problem is , that in my SvrProcess, if I update the record which is referenced by the window, then the window is not also updated (it needs to be refreshed manually), because of the asynchronous nature of the operation. Hence my question no. 1 above.
I also wonder, if there isn't a simpler way to do this, as there was in version 1?
Your assistance would be highly appreciated.
Here is the static helper method, which uses AEnv.executeAsyncDesktopTask:
public static void showDialogAsk(final String msg, final Callback<Boolean> callback) {
Runnable runnable = new Runnable() {
@Override
public void run() {
FDialog.ask(0, null, msg, callback);
}
};
AEnv.executeAsyncDesktopTask(runnable);
}
References:
https://groups.google.com/forum/#!searchin/idempiere/Components$20can$20be$20accessed$20only$20in$20event$20listeners/idempiere/BZmV94A2FbQ/k1JYzQwIsh8Jhttps://groups.google.com/forum/#!searchin/idempiere/Components$20can$20be$20accessed$20only$20in$20event$20listeners/idempiere/HBoEo2Yx1dc/g3bd9t3w4NEJ-----
Neil Gordon
nTier Software Services