diff --git a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java index bfe0320c45..9fa676f94e 100644 --- a/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java +++ b/designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java @@ -967,7 +967,7 @@ public class MutilTempalteTabPane extends JComponent { //如果在权限编辑情况下,不允许切换到表单类型的工作簿 if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) { DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex)); - FineJOptionPane.showMessageDialog(MutilTempalteTabPane.this, Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Form_Authority_Edited_Cannot_Be_Supported") + "!", Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.WARNING_MESSAGE); MutilTempalteTabPane.this.repaint(); return; diff --git a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java index d9c98ce4a0..f556397288 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java @@ -1481,10 +1481,8 @@ public abstract class JTemplate> editingFILE = fileChooser.getSelectedFILE(); } - // 在保存之前,初始化 templateID - if (StringUtils.isEmpty(this.template.getTemplateID())) { - generateTemplateId(); - } + //收集和生成templateID 因为是另存为操作 无论怎么样都需要重新生成templateID + initForCollect(); FILE finalEditingFILE = editingFILE; CallbackSaveWorker worker = new CallbackSaveWorker(new Callable() { diff --git a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java index 54db2ec1ab..a78c532704 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/JForm.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/JForm.java @@ -4,6 +4,7 @@ import com.fr.base.BaseUtils; import com.fr.base.PaperSize; import com.fr.base.Parameter; import com.fr.base.extension.FileExtension; +import com.fr.base.iofile.attr.ExtendSharableAttrMark; import com.fr.base.vcs.DesignerMode; import com.fr.design.DesignModelAdapter; import com.fr.design.DesignState; @@ -64,6 +65,11 @@ import com.fr.file.filter.ChooseFileFilter; import com.fr.form.FormElementCaseContainerProvider; import com.fr.form.FormElementCaseProvider; import com.fr.form.main.Form; +import com.fr.form.main.WidgetGatherAdapter; +import com.fr.form.share.SharableWidgetProvider; +import com.fr.form.share.editor.SharableEditorProvider; +import com.fr.form.share.utils.ShareUtils; +import com.fr.form.ui.AbstractBorderStyleWidget; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WLayout; @@ -77,6 +83,7 @@ import com.fr.report.worksheet.FormElementCase; import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; import com.fr.stable.ProductConstants; +import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; import com.fr.web.controller.ViewRequestConstants; @@ -96,6 +103,7 @@ import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import javax.swing.tree.TreePath; @@ -305,6 +313,7 @@ public class JForm extends JTemplate implements BaseJForm implements BaseJForm