gpt4 book ai didi

java - Callout Adempiere 中的确认(是/否)对话框

转载 作者:行者123 更新时间:2023-11-30 08:23:34 32 4
gpt4 key购买 nike

我正在尝试在 Adempiere 中获取确认对话框。我用过

 JOptionPane.showConfirmDialog(null, msg,"", JOptionPane.YES_NO_OPTION); 
or
ADialog.ask(WindowNo, null,msg)

instead of
mTab.fireDataStatusEEvent ("NoQtyAvailable", "0", true);

我收到弹出窗口(是/NO )并且在 Swing 中工作正常,但它不适用于 WEBUI。

我的代码:

if (product.isStocked())
{
if (available == null)
available = Env.ZERO;
if (available.signum() == 0){
//mTab.fireDataStatusEEvent ("NoQtyAvailable", "0", false);
int response = JOptionPane.showConfirmDialog(null, msg,
"", JOptionPane.YES_NO_OPTION);
if (response == JOptionPane.YES_OPTION)
mTab.setValue("BC_Qty", mTab.getValue("QtyEntered"));
else
mTab.setValue("BC_Qty", Env.ZERO);
}
}

构建错误:

Buildfile: E:\Adempiere360\svn\base\build.xml
init:
[echo] =========== Build Base
makedir:
compile:
[javac] E:\Adempiere360\svn\base\build.xml:56: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to E:\Adempiere360\svn\base\build
[javac]
E:\Adempiere360\svn\base\src\org\compiere\model\CalloutOrder.java:27: package org.adempiere.webui.window does not exist
[javac] import org.adempiere.webui.window.FDialog;
[javac] ^
[javac]
E:\Adempiere360\svn\base\src\org\compiere\model\CalloutOrder.java:827: warning: [deprecation] getQtyAvailable(int,int,int,java.lang.String) in org.compiere.model.MStorage has been deprecated
[javac] BigDecimal available = MStorage.getQtyAvailable
[javac] ^
[javac]
E:\Adempiere360\svn\base\src\org\compiere\model\CalloutOrder.java:833: cannot find symbol
[javac] symbol : variable FDialog
[javac] location: class org.compiere.model.CalloutOrder
[javac] if(FDialog.ask(WindowNo, null, msg))
[javac] ^
[javac]
E:\Adempiere360\svn\base\src\org\compiere\model\CalloutOrder.java:1309: warning: [deprecation] getQtyAvailable(int,int,int,java.lang.String) in org.compiere.model.MStorage has been deprecated
[javac] BigDecimal available = MStorage.getQtyAvailable
[javac] ^
[javac] 2 errors
[javac] 2 warnings

BUILD FAILED
E:\Adempiere360\svn\base\build.xml:56: Compile failed; see the compiler error output for details.

任何建议将不胜感激。

最佳答案

ADempiere 将按照以下顺序构建代码

tools/build.xml
base/build.xml
extend/build.xml
client/build.xml
JasperReports/build.xml
serverRoot/build.xml
serverApps/build.xml
webStore/build.xml
webCM/build.xml
sqlj/build.xml
posterita/posterita/build.xml
zkwebui/build.xml
install/build.xml

“FDialog”类在“zkwebui”文件夹中定义。您已经在 CalloutOrder.java(import org.adempiere.webui.window.FDialog;) 中使用了 FDialog 类。因此,在构建“Base”文件夹时它 (FDialog) 不可见。

您只需从 CalloutOrder.java 类中删除 import org.adempiere.webui.window.FDialog; 语句。它将改进您的构建并在 webUI 中正常工作。

您可以从 here 中找到构建订单详细信息

关于java - Callout Adempiere 中的确认(是/否)对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23577808/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com