From 81bf9616db12bd64fcff3b2ca10001de3eb60f2c Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" <1536296691@qq.com> Date: Sat, 9 Oct 2021 15:36:00 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-59475=20=E6=8E=A7=E4=BB=B6=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=85=AC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/frpane/RegFieldPane.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java index 6e073bb61..38e33514b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java +++ b/designer-base/src/main/java/com/fr/design/gui/frpane/RegFieldPane.java @@ -13,6 +13,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.form.ui.TextEditor; import com.fr.form.ui.reg.NoneReg; import com.fr.form.ui.reg.RegExp; +import com.fr.log.FineLoggerFactory; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -88,11 +89,17 @@ public class RegFieldPane extends RegPane { private void initRegErrorMsgField() { TextFieldAdapterProvider provider = ExtraDesignClassManager.getInstance().getSingle(TextFieldAdapterProvider.XML_TAG); - if (provider != null) { - errorMsgTextFieldAdapter= provider.createTextFieldAdapter(); + if (provider == null) { + errorMsgTextFieldAdapter = new UITextFieldAdapter(); return; } - errorMsgTextFieldAdapter = new UITextFieldAdapter(); + try { + errorMsgTextFieldAdapter = provider.createTextFieldAdapter(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + errorMsgTextFieldAdapter = new UITextFieldAdapter(); + + } } @Override