Browse Source

Merge pull request #732 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit 'de464beffa3fa9b4ae882d225bc1e804d9e1ebc0':
  REPORT-14092 [FindBugs问题修复]
bugfix/10.0
kerry 6 years ago
parent
commit
4af18121e7
  1. 7
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

7
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.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.general.web.ParameterConstants;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.web.AbstractWebletCreator; import com.fr.stable.web.AbstractWebletCreator;
@ -26,7 +27,11 @@ public final class WebPreviewUtils {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static void preview(JTemplate<?, ?> jt, PreviewProvider provider) { public static void preview(JTemplate<?, ?> jt, PreviewProvider provider) {
String baseRoute = jt.route(); 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<String, Object> map, String actionType) { private static void actionPerformed(JTemplate<?, ?> jt, String baseRoute, Map<String, Object> map, String actionType) {

Loading…
Cancel
Save