Added export method to XML file

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@71300 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Antonio Gioia 2013-03-13 11:10:23 +00:00
parent 4f258ce4ec
commit 52db4b45b4
4 changed files with 25 additions and 4 deletions

View File

@ -1,8 +1,7 @@
#Wed Mar 13 11:54:06 CET 2013
=\=\=\=\=\=\=
<<<<<<<=.mine
>>>>>>>=.r71295
eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.0.5-SNAPSHOT
lastWarOutDir=/home/gioia/workspace/reports/target/reports-4.0.5-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -5,6 +5,12 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
<dependent-module archiveName="gcube-docx-generator-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-docx-generator/gcube-docx-generator">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="report-exporter-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/report-exporter-widget/report-exporter-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
<property name="context-root" value="reports"/>
</wb-module>

View File

@ -53,8 +53,9 @@ public class Headerbar extends Composite{
private static final String EXPORT_OPENXML = "Export to OpenXML (docx)";
private static final String EXPORT_HTML = "Export to HTML";
private static final String EXPORT_FIMES = "Export to FiMES XML";
private static final String EXPORT_XML = "Export to XML";
private static final String EXPORT_ENCRYPTED_REPORT = "Save Encrypted Version to Desktop";
private static final String VIEW_USER_COMMENTS = "View user comments";
String location;
@ -90,6 +91,8 @@ public class Headerbar extends Composite{
private MenuItem optionFimes;
private MenuItem optionXML;
private MenuItem optionEncryptedModel;
private MenuItem viewMetadata;
@ -349,12 +352,14 @@ public class Headerbar extends Composite{
optionPDF = new MenuItem("<font color=\"gray\">Export to PDF</font>", true, getDisabledExportMenuItemCmd());
optionHTML = new MenuItem("<font color=\"gray\">"+ EXPORT_HTML +"</font>", true, getDisabledExportMenuItemCmd());
optionFimes = new MenuItem("<font color=\"gray\">"+ EXPORT_FIMES +"</font>", true, getDisabledExportMenuItemCmd());
optionXML = new MenuItem("<font color=\"gray\">"+ EXPORT_XML +"</font>", true, getDisabledExportMenuItemCmd());
optionEncryptedModel = new MenuItem("<font color=\"gray\">"+ EXPORT_ENCRYPTED_REPORT +"</font>", true, getDisabledExportMenuItemCmd());
exportsMenu.addItem(optionDOCX);
exportsMenu.addItem(optionHTML);
exportsMenu.addItem(optionPDF);
exportsMenu.addItem(optionXML);
exportsMenu.addItem(optionEncryptedModel);
//optionsMenu.addItem(optionPDF);
//exportsMenu.addItem(optionFimes);
@ -410,6 +415,9 @@ public class Headerbar extends Composite{
optionFimes.setHTML(EXPORT_FIMES);
optionFimes.setCommand(generateFimes);
optionXML.setHTML(EXPORT_XML);
optionXML.setCommand(generatedXML);
optionEncryptedModel.setHTML(EXPORT_ENCRYPTED_REPORT);
optionEncryptedModel.setCommand(generateEncryptedModel);
//
@ -631,6 +639,12 @@ public class Headerbar extends Composite{
}
};
Command generatedXML = new Command() {
public void execute() {
presenter.generateManifestation(templateModel, ExportManifestationType.XML);
}
};
Command generateEncryptedModel = new Command() {
@Override

View File

@ -680,7 +680,9 @@ public class Presenter {
case PDF:
popup.export(reportModel, TypeExporter.PDF);
break;
case XML:
popup.export(reportModel, TypeExporter.XML);
break;
}