private int choosePrintOptionId (HashSet<Integer> options) throws Exception {
var optArr = options.toArray(new Integer[options.size()]);
String msg = Msg.getMsg(Env.getCtx(), "sbsp_printoptiondialog");
CompletableFuture<Object> future = new CompletableFuture<>();
StringBuilder validation = new StringBuilder("sbsp_printoption.sbsp_printoption_id IN (");
if (optArr.length > 0)
validation.append(optArr[0]);
for (int i = 1; i < optArr.length; i++)
validation.append(",").append(optArr[i]);
validation.append(")");
MLookup lookup = MLookupFactory.get(
Env.getCtx(),
windowno,
1000191, /*sbsp_printoption.value*/
DisplayType.TableDir,
Env.getLanguage(Env.getCtx()),
"sbsp_printoption_ID",
19, /*table direct*/
false,
validation.toString());
FDialog.askForInput(
msg,
lookup,
DisplayType.TableDir,
(obj) -> future.complete(obj),
AEnv.getDesktop(),
windowno);
Object rtn = future.get(10, TimeUnit.SECONDS);
return rtn == null ? 0 : (Integer) rtn;
}


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/2886d2c1-62ba-45d8-acd4-e82e8a2325e2n%40googlegroups.com.