Browse Source

REPORT-59681 远程设计控制模板自适应权限控制

zheng-1641779399395
Henry.Wang 3 years ago
parent
commit
8edae1949c
  1. 35
      designer-realize/src/main/java/com/fr/design/webattr/EditReportServerParameterPane.java

35
designer-realize/src/main/java/com/fr/design/webattr/EditReportServerParameterPane.java

@ -9,6 +9,7 @@ import com.fr.config.PrintConfig;
import com.fr.config.ServerPreferenceConfig;
import com.fr.design.gui.frpane.LoadingBasicPane;
import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.webattr.printsettings.GlobalNativePrintSettingPane;
import com.fr.design.webattr.printsettings.PrintSettingPane;
@ -17,6 +18,7 @@ import com.fr.report.web.WebPage;
import com.fr.report.web.WebView;
import com.fr.report.web.WebWrite;
import com.fr.web.attr.ReportWebAttr;
import com.fr.workspace.WorkContext;
import javax.swing.JPanel;
import java.awt.BorderLayout;
@ -35,18 +37,20 @@ public class EditReportServerParameterPane extends LoadingBasicPane {
private WriteToolBarPane writePane;
private ReportWebAttr webAttr;
private PrintSettingsAttrMark printSettings;
private WebCssPane cssPane;
private WebJsPane jsPane;
private ErrorTemplatePane errorTemplatePane;
private PrintSettingPane printSettingPane;
private ServerFitAttrPane serverFitAttrPane;
@Override
protected synchronized void initComponents(JPanel container) {
protected synchronized void initComponents(JPanel container) {
JPanel defaultPane = container;
defaultPane.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -61,11 +65,14 @@ public class EditReportServerParameterPane extends LoadingBasicPane {
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Import_JavaScript"), jsPane = new WebJsPane());
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Error_Handler_Template"), errorTemplatePane = new ErrorTemplatePane());
tabbedPane.addTab(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Print_Setting"), printSettingPane = new PrintSettingPane(new GlobalNativePrintSettingPane()));
if (WorkContext.getCurrent().isRoot()) {
tabbedPane.addTab(Toolkit.i18nText("Fine-Designer_PC_Fit_Attr"), serverFitAttrPane = new ServerFitAttrPane());
}
}
@Override
protected String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Report_Server_Parameter");
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ReportServerP_Report_Server_Parameter");
}
public void populate(ServerPreferenceConfig reportServerPreferenceConfig) {
@ -78,28 +85,31 @@ public class EditReportServerParameterPane extends LoadingBasicPane {
WebPage webPage = webAttr.getWebPage();
WebView webView = webAttr.getWebView();
WebWrite webWrite = webAttr.getWebWrite();
if(webPage != null){
if (webPage != null) {
pagePane.populateBean(webPage);
}
if(webView != null){
if (webView != null) {
viewPane.populateBean(webView);
}
if(webWrite != null){
if (webWrite != null) {
writePane.populateBean(webWrite);
}
cssPane.populate(webAttr);
jsPane.populate(webAttr);
printSettings = ReportUtils.getPrintSettingsFromServerConfig();
printSettingPane.populate(printSettings);
this.errorTemplatePane.populateBean(reportServerPreferenceConfig.getErrorTemplate());
if (serverFitAttrPane != null) {
serverFitAttrPane.populateBean(null);
}
}
/**
* Update.
*/
public void update(ServerPreferenceConfig reportServerPreferenceConfig) {
ReportWebAttr webAttr = ((ReportWebAttr)ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
ReportWebAttr webAttr = ((ReportWebAttr) ConfigManager.getProviderInstance().getGlobalAttribute(ReportWebAttr.class));
webAttr.setWebPage(pagePane.updateBean());
webAttr.setWebView(viewPane.updateBean());
webAttr.setWebWrite(writePane.updateBean());
@ -110,5 +120,8 @@ public class EditReportServerParameterPane extends LoadingBasicPane {
PrintConfig.getInstance().setPrintSettings(printSettings);
reportServerPreferenceConfig.setErrorTemplate(this.errorTemplatePane.updateBean());
if (serverFitAttrPane != null) {
serverFitAttrPane.updateBean();
}
}
}

Loading…
Cancel
Save