Browse Source

Merge pull request #429 in DESIGN/design from ~NEIL/design-10:release/10.0 to release/10.0

* commit '40c3d11dbdc683053512eec882039b93bc314823':
  REPORT-10882【10.0冒烟】填报属性设置界面,自定义提交和数据校验无法设置
final/10.0
neil 6 years ago
parent
commit
964ed8fc90
  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