Browse Source

REPORT-10882【10.0冒烟】填报属性设置界面,自定义提交和数据校验无法设置

final/10.0
neil 6 years ago
parent
commit
40c3d11dbd
  1. 9
      designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java

9
designer-base/src/main/java/com/fr/design/gui/controlpane/ObjectJControlPane.java

@ -24,7 +24,14 @@ public abstract class ObjectJControlPane extends JListControlPane {
@Override
public BasicBeanPane createPaneByCreators(NameableCreator creator) {
try {
return Reflect.on(creator.getUpdatePane()).create(object).get();
Class target = creator.getUpdatePane();
Reflect reflect = Reflect.on(target);
// 判断是否存在对应构造函数
if (reflect.matchConstructor(object)) {
return reflect.create(object).get();
}
return reflect.create().get();
} catch (Exception e) {
return super.createPaneByCreators(creator);
}

Loading…
Cancel
Save