Browse Source

Merge pull request #1413 in DESIGN/design from ~HADES/design:final/10.0 to final/10.0

* commit '4d56944006ef9e650d568c69e1671b7eed5822a9':
  MOBILE-24587 同步到final
final/10.0
Kara 5 years ago
parent
commit
65bb82da35
  1. 3
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java
  2. 16
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

3
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/MobileAdvanceDefinePane.java

@ -139,6 +139,9 @@ public class MobileAdvanceDefinePane extends MobileWidgetDefinePane {
MobileBookMark bookMark = xCreator.toData().getMobileBookMark();
bookMark.setUseBookMark(this.useBookMarkCheck.isSelected());
String newBookMarkName = this.bookMarkNameField.getText();
if (ComparatorUtils.equals(newBookMarkName, bookMark.getBookMarkName())) {
return;
}
if (!isExist(newBookMarkName)) {
bookMark.setBookMarkName(newBookMarkName);
} else {

16
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileComponentFrozenPane.java

@ -64,18 +64,26 @@ public class MobileComponentFrozenPane extends BasicPane {
public void update(XCreator xCreator) {
List<String> selected = new ArrayList<>();
WSortLayout wSortLayout = ((WSortLayout) xCreator.toData());
List<String> all = wSortLayout.getNonContainerWidgetList();
for (String widgetName : all) {
updateMobileBookMark(wSortLayout, widgetName, false);
}
Object[] values = uiComboCheckBox.getSelectedValues();
for (Object value : values) {
String widgetName = (String) value;
selected.add(widgetName);
Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, widgetName);
if (widget != null) {
widget.getMobileBookMark().setFrozen(true);
}
updateMobileBookMark(wSortLayout, widgetName, true);
}
wSortLayout.updateFrozenWidgets(selected);
}
private void updateMobileBookMark(WSortLayout wSortLayout, String widgetName, boolean frozen) {
Widget widget = FormWidgetHelper.findWidgetWithBound(wSortLayout, widgetName);
if (widget != null) {
widget.getMobileBookMark().setFrozen(frozen);
}
}
public void populate(XCreator xCreator) {
WSortLayout wSortLayout = ((WSortLayout) xCreator.toData());
List<String> all = wSortLayout.getNonContainerWidgetList();

Loading…
Cancel
Save