Browse Source

MOBILE-19684 同时安装顶部参数插件和导航参数插件时设计器显示重复值

final/10.0
Hades 6 years ago
parent
commit
553bb2a605
  1. 10
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

10
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java

@ -21,7 +21,6 @@ import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.container.WSortLayout; import com.fr.form.ui.container.WSortLayout;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.SiteCenter; import com.fr.general.SiteCenter;
import com.fr.json.JSONException;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.report.ExtraReportClassManager; import com.fr.report.ExtraReportClassManager;
import com.fr.report.fun.MobileParamStyleProvider; import com.fr.report.fun.MobileParamStyleProvider;
@ -109,9 +108,9 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
Item[] items = new Item[pluginCreators.size() + 1]; Item[] items = new Item[pluginCreators.size() + 1];
MobileParamStyleProvider provider = new DefaultMobileParamStyle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default")); MobileParamStyleProvider provider = new DefaultMobileParamStyle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default"));
items[0] = new Item(provider.descriptor(), provider); items[0] = new Item(provider.descriptor(), provider);
for (int i = 0; i < pluginCreators.size(); i++) { int i = 1;
provider = pluginCreators.iterator().next(); for (MobileParamStyleProvider mobileParamStyleProvider : pluginCreators) {
items[i + 1] = new Item(provider.descriptor(), provider); items[i++] = new Item(mobileParamStyleProvider.descriptor(), mobileParamStyleProvider);
} }
return items; return items;
} }
@ -161,6 +160,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
private UIComboBox getParamLocationComboBox() { private UIComboBox getParamLocationComboBox() {
items = getItems(); items = getItems();
UIComboBox paramLocationComoBox = new UIComboBox(items); UIComboBox paramLocationComoBox = new UIComboBox(items);
paramLocationComoBox.addItemListener(new ItemListener() { paramLocationComoBox.addItemListener(new ItemListener() {
@Override @Override
@ -218,7 +218,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane {
break; break;
} }
} }
} catch (JSONException e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
paramLocationComboBox.setSelectedIndex(index); paramLocationComboBox.setSelectedIndex(index);

Loading…
Cancel
Save