From de464beffa3fa9b4ae882d225bc1e804d9e1ebc0 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 4 Jan 2019 11:42:34 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-14092=20[FindBugs=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/actions/file/WebPreviewUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java index 5434abc09..18c93f74c 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java @@ -9,6 +9,7 @@ import com.fr.design.utils.DesignUtils; import com.fr.file.FILE; import com.fr.file.FileNodeFILE; import com.fr.general.GeneralUtils; +import com.fr.general.web.ParameterConstants; import com.fr.stable.project.ProjectConstants; import com.fr.stable.web.AbstractWebletCreator; @@ -26,7 +27,11 @@ public final class WebPreviewUtils { @SuppressWarnings("unchecked") public static void preview(JTemplate jt, PreviewProvider provider) { String baseRoute = jt.route(); - actionPerformed(jt, baseRoute, provider == null ? Collections.EMPTY_MAP : provider.parametersForPreview(), provider.getActionType()); + if (provider == null) { + actionPerformed(jt, baseRoute, Collections.EMPTY_MAP, ParameterConstants.VIEWLET); + } else { + actionPerformed(jt, baseRoute, provider.parametersForPreview(), provider.getActionType()); + } } private static void actionPerformed(JTemplate jt, String baseRoute, Map map, String actionType) {