From 553bb2a605b0cd9b71f241ebd0bf374ef765ef0c Mon Sep 17 00:00:00 2001 From: Hades Date: Fri, 25 Jan 2019 11:23:28 +0800 Subject: [PATCH] =?UTF-8?q?MOBILE-19684=20=E5=90=8C=E6=97=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E9=A1=B6=E9=83=A8=E5=8F=82=E6=95=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=92=8C=E5=AF=BC=E8=88=AA=E5=8F=82=E6=95=B0=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=98=BE=E7=A4=BA=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/designer/mobile/ParaMobileDefinePane.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java index 7e0f3b940a..b924b5c55a 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ParaMobileDefinePane.java +++ b/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.general.ComparatorUtils; import com.fr.general.SiteCenter; -import com.fr.json.JSONException; import com.fr.log.FineLoggerFactory; import com.fr.report.ExtraReportClassManager; import com.fr.report.fun.MobileParamStyleProvider; @@ -109,9 +108,9 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { Item[] items = new Item[pluginCreators.size() + 1]; MobileParamStyleProvider provider = new DefaultMobileParamStyle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default")); items[0] = new Item(provider.descriptor(), provider); - for (int i = 0; i < pluginCreators.size(); i++) { - provider = pluginCreators.iterator().next(); - items[i + 1] = new Item(provider.descriptor(), provider); + int i = 1; + for (MobileParamStyleProvider mobileParamStyleProvider : pluginCreators) { + items[i++] = new Item(mobileParamStyleProvider.descriptor(), mobileParamStyleProvider); } return items; } @@ -161,6 +160,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { private UIComboBox getParamLocationComboBox() { items = getItems(); + UIComboBox paramLocationComoBox = new UIComboBox(items); paramLocationComoBox.addItemListener(new ItemListener() { @Override @@ -218,7 +218,7 @@ public class ParaMobileDefinePane extends MobileWidgetDefinePane { break; } } - } catch (JSONException e) { + } catch (Exception e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); } paramLocationComboBox.setSelectedIndex(index);