Browse Source

REPORT-54716 决策报表中修改组件名为大写,提示重名

zheng-1641779399395
Henry.Wang 3 years ago
parent
commit
f2e7401bda
  1. 11
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

11
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormWidgetCardPane.java

@ -86,7 +86,7 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
return null;
} else if (xLayoutContainer.acceptType(XWAbsoluteLayout.class)) {
return new WidgetAbsoluteBoundPane(xCreator);
} else if(xCreator.acceptType(XWCardTagLayout.class)){
} else if (xCreator.acceptType(XWCardTagLayout.class)) {
return new WidgetCardTagBoundPane(xCreator);
}
return new WidgetBoundPane(xCreator);
@ -231,7 +231,14 @@ public class FormWidgetCardPane extends AbstractAttrNoScrollPane {
UITextField widgetNameField = widgetPropertyPane.getWidgetNameField();
String toSetWidgetName = widgetNameField.getText();
String currentWidgetName = widget.getWidgetName();
boolean exist = designer.getTarget().isNameExist(toSetWidgetName) && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
boolean isNameExist = false;
Widget tempWidget = designer.getTarget().getWidgetByName(toSetWidgetName);
if (!ComparatorUtils.equals(widget, tempWidget)) {
isNameExist = true;
} else if (ComparatorUtils.equals(toSetWidgetName, tempWidget.getWidgetName())) {
isNameExist = true;
}
boolean exist = isNameExist && !ComparatorUtils.equals(toSetWidgetName, currentWidgetName);
if (toSetWidgetName.isEmpty()) {
widgetNameField.setText(currentWidgetName);
return;

Loading…
Cancel
Save