diff --git a/designer/src/com/fr/design/mainframe/JWorkBook.java b/designer/src/com/fr/design/mainframe/JWorkBook.java index 82d796a30d..fe66b65d6b 100644 --- a/designer/src/com/fr/design/mainframe/JWorkBook.java +++ b/designer/src/com/fr/design/mainframe/JWorkBook.java @@ -51,7 +51,7 @@ import com.fr.file.filetree.FileNode; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.general.ModuleContext; -import com.fr.general.web.ParameterConsts; +import com.fr.general.web.ParameterConstants; import com.fr.grid.Grid; import com.fr.grid.GridUtils; import com.fr.io.exporter.EmbeddedTableDataExporter; @@ -62,7 +62,6 @@ import com.fr.poly.PolyDesigner; import com.fr.poly.creator.BlockCreator; import com.fr.privilege.finegrain.WorkSheetPrivilegeControl; import com.fr.report.ReportHelper; -import com.fr.report.elementcase.ElementCase; import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.poly.PolyWorkSheet; import com.fr.report.worksheet.WorkSheet; @@ -844,7 +843,7 @@ public class JWorkBook extends JTemplate { */ public void previewMenuActionPerformed(PreviewProvider provider) { setPreviewType(provider); - WebPreviewUtils.actionPerformed(this, provider.parametersForPreview(), ParameterConsts.REPORTLET); + WebPreviewUtils.actionPerformed(this, provider.parametersForPreview(), ParameterConstants.REPORTLET); } /** diff --git a/designer_base/src/com/fr/design/actions/file/WebPreviewUtils.java b/designer_base/src/com/fr/design/actions/file/WebPreviewUtils.java index 0947d4323a..494a77cbc6 100644 --- a/designer_base/src/com/fr/design/actions/file/WebPreviewUtils.java +++ b/designer_base/src/com/fr/design/actions/file/WebPreviewUtils.java @@ -7,7 +7,7 @@ import com.fr.file.FILE; import com.fr.file.FileNodeFILE; import com.fr.general.GeneralUtils; import com.fr.general.Inter; -import com.fr.general.web.ParameterConsts; +import com.fr.general.web.ParameterConstants; import com.fr.stable.project.ProjectConstants; import javax.swing.*; @@ -16,11 +16,11 @@ import java.util.Map; public final class WebPreviewUtils { public static void onWorkbookPreview(JTemplate jt) { - actionPerformed(jt, jt.getPreviewType().parametersForPreview(), ParameterConsts.REPORTLET); + actionPerformed(jt, jt.getPreviewType().parametersForPreview(), ParameterConstants.REPORTLET); } public static void onFormPreview(JTemplate jt) { - actionPerformed(jt, null, ParameterConsts.FORMLET); + actionPerformed(jt, null, ParameterConstants.FORMLET); } public static void actionPerformed(JTemplate jt, Map map, String actionType) { diff --git a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java index a766e35315..08ba1e7508 100644 --- a/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java +++ b/designer_base/src/com/fr/design/actions/server/PlatformManagerAction.java @@ -5,7 +5,6 @@ import com.fr.design.actions.UpdateAction; import com.fr.design.menu.MenuKeySet; import com.fr.design.utils.DesignUtils; import com.fr.general.Inter; -import com.fr.general.web.ParameterConsts; import javax.swing.*; import java.awt.event.ActionEvent; diff --git a/designer_base/src/com/fr/design/style/FormatPane.java b/designer_base/src/com/fr/design/style/FormatPane.java index 59e3cda2f2..5b642bdb4e 100644 --- a/designer_base/src/com/fr/design/style/FormatPane.java +++ b/designer_base/src/com/fr/design/style/FormatPane.java @@ -3,15 +3,20 @@ */ package com.fr.design.style; -import java.awt.BorderLayout; -import java.awt.Color; -import java.awt.FlowLayout; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.text.DecimalFormat; -import java.text.Format; -import java.text.SimpleDateFormat; -import java.util.Date; +import com.fr.base.FRContext; +import com.fr.base.TextFormat; +import com.fr.data.core.FormatField; +import com.fr.data.core.FormatField.FormatContents; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIRadioButton; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.general.ComparatorUtils; +import com.fr.general.Inter; +import com.fr.stable.ArrayUtils; +import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; @@ -25,21 +30,15 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; - -import com.fr.base.FRContext; -import com.fr.base.TextFormat; -import com.fr.data.core.FormatField; -import com.fr.data.core.FormatField.FormatContents; -import com.fr.design.gui.ibutton.UIRadioButton; -import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.layout.FRGUIPaneFactory; -import com.fr.design.dialog.BasicPane; -import com.fr.general.ComparatorUtils; -import com.fr.general.Inter; -import com.fr.stable.ArrayUtils; -import com.fr.stable.StringUtils; -import com.fr.design.utils.gui.GUICoreUtils; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.FlowLayout; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.text.DecimalFormat; +import java.text.Format; +import java.text.SimpleDateFormat; +import java.util.Date; /** * 属性界面中的格式面板 @@ -316,6 +315,9 @@ public class FormatPane extends BasicPane { */ public Format update() { String text = patternTextField.getText(); + if (getFormatContents() == FormatContents.TEXT) { + return FormatField.getInstance().getFormat(getFormatContents(), text); + } if(StringUtils.isEmpty(text)) { return null; } diff --git a/designer_base/src/com/fr/start/server/TomcatHost.java b/designer_base/src/com/fr/start/server/TomcatHost.java index 2889751041..c8a3c0a921 100644 --- a/designer_base/src/com/fr/start/server/TomcatHost.java +++ b/designer_base/src/com/fr/start/server/TomcatHost.java @@ -71,6 +71,7 @@ public class TomcatHost { this.listener = new AprLifecycleListener(); this.server.addLifecycleListener(listener); this.tomcat.getHost().setAppBase(StableUtils.getInstallHome() + File.separator + "."); + this.tomcat.getConnector().setURIEncoding("UTF-8"); } catch (Exception e) { //todo 最好加一个用server.xml FRContext.getLogger().error(e.getMessage(), e);