Browse Source

Pull request #9102: REPORT-71957 组件复用-创建组件,确认后提示共享组件创建失败,且日志有报错

Merge in DESIGN/design from ~STARRYI/design:release/10.0 to release/10.0

* commit '182d70f604ada283eac66543e37ea6e347247c8b':
  REPORT-71957 组件复用-创建组件,确认后提示共享组件创建失败,且日志有报错
security/10.0
starryi 2 years ago
parent
commit
96b3325312
  1. 10
      designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java

10
designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareMainPane.java

@ -32,6 +32,7 @@ import com.fr.design.mainframe.share.ui.base.ui.PlaceHolderUI;
import com.fr.design.mainframe.share.util.ShareUIUtils;
import com.fr.design.share.effect.EffectItemGroup;
import com.fr.design.share.utils.ShareDialogUtils;
import com.fr.file.FileCommonUtils;
import com.fr.form.share.DefaultSharableWidget;
import com.fr.form.share.bean.StyleThemeBean;
import com.fr.form.share.constants.ShareComponentConstants;
@ -581,6 +582,15 @@ public class ShareMainPane extends JPanel {
Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));
return false;
}
if (FileCommonUtils.isFileNameValid(name)) {
FineJOptionPane.showMessageDialog(
shareDialog,
Toolkit.i18nText("Fine-Design_Share_Generate_Failure_Illegal_Component_Name_Tip"),
Toolkit.i18nText("Fine-Design_Basic_Error"),
ERROR_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"));
return false;
}
if (upload && StringUtils.isEmpty(content.getText())) {
FineJOptionPane.showMessageDialog(shareDialog, Toolkit.i18nText("Fine-Design_Share_Lack_Content"),
Toolkit.i18nText("Fine-Design_Basic_Error"), ERROR_MESSAGE, UIManager.getIcon("OptionPane.errorIcon"));

Loading…
Cancel
Save