Browse Source

REPORT-13544 填报属性设置-自定义按钮有点问题,9.0也存在

bugfix/10.0
Hades 6 years ago
parent
commit
ba9bc4cf17
  1. 18
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

18
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -513,6 +513,12 @@ public class EditToolBar extends BasicPane {
javaScriptPane.setPreferredSize(new Dimension(750, 500));
BasicDialog dialog = javaScriptPane.showWindow(SwingUtilities.getWindowAncestor(ButtonPane.this));
dialog.addDialogActionListener(new DialogActionAdapter() {
@Override
public void doCancel() {
javaScriptPane.populateBean(((CustomToolBarButton) widget).getJSImpl());
}
@Override
public void doOk() {
((CustomToolBarButton) widget).setJSImpl(javaScriptPane.updateBean());
@ -619,7 +625,7 @@ public class EditToolBar extends BasicPane {
} else if (widget instanceof Submit) {
updateSubmit();
} else if (widget instanceof CustomToolBarButton) {
((CustomToolBarButton) widget).setJSImpl(this.javaScriptPane.updateBean());
updateCustomToolBarButton();
} else if (widget instanceof Email) {
updateEmail();
}
@ -670,6 +676,16 @@ public class EditToolBar extends BasicPane {
email.setConsigneeByDepartment(this.consigneeByDepartment.isSelected());
email.setConsigneeByRole(this.consigneeByRole.isSelected());
}
private void updateCustomToolBarButton() {
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget;
if (customToolBarButton.getJSImpl() != null) {
customToolBarButton.setJSImpl(this.javaScriptPane.updateBean());
} else {
customToolBarButton.setJSImpl(JavaScriptActionPane.createDefault().updateBean());
}
}
}
}

Loading…
Cancel
Save