refactored with new Workspace Navigator instead of Workspace light tree

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@119132 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-09-28 17:05:00 +00:00
parent 03769055d4
commit 8ca1678cf4
13 changed files with 365 additions and 323 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/reports-4.13.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/reports-5.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/reports-4.13.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/reports-5.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -4,7 +4,7 @@
<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="workspace-light-tree-2.14.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-light-tree/workspace-light-tree">
<dependent-module archiveName="gcube-reporting-modeler-1.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-modeler/gcube-reporting-modeler">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="gcube-reporting-library-3.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library">

1
.tern-project Normal file
View File

@ -0,0 +1 @@
{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>reports</artifactId>
<packaging>war</packaging>
<version>4.13.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<name>gCube Reports Manager</name>
<description>
gCube Reports Portlet.
@ -158,8 +158,8 @@
</dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>workspace-light-tree</artifactId>
<version>[2.13.1-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
<artifactId>workspace-explorer</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.admin</groupId>

View File

@ -1,6 +1,7 @@
package org.gcube.portlets.user.reportgenerator.client;
import java.util.Arrays;
import java.util.List;
import org.gcube.portlets.d4sreporting.common.shared.Metadata;
@ -12,10 +13,10 @@ import org.gcube.portlets.user.reportgenerator.client.dialog.PagePropertiesDialo
import org.gcube.portlets.user.reportgenerator.client.model.ExportManifestationType;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateModel;
import org.gcube.portlets.user.reportgenerator.shared.VMETypeIdentifier;
import org.gcube.portlets.widgets.lighttree.client.ItemType;
import org.gcube.portlets.widgets.lighttree.client.event.PopupEvent;
import org.gcube.portlets.widgets.lighttree.client.event.PopupHandler;
import org.gcube.portlets.widgets.lighttree.client.load.WorkspaceLightTreeLoadPopup;
import org.gcube.portlets.widgets.wsexplorer.shared.*;
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
import org.gcube.portlets.widgets.wsexplorer.shared.FilterCriteria;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.google.gwt.core.client.GWT;
@ -742,25 +743,32 @@ public class Headerbar extends Composite{
ScheduledCommand generateEncryptedModel = new ScheduledCommand() {
@Override
public void execute() {
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
GWT.runAsync(WorkspaceExplorerSelectDialog.class, new RunAsyncCallback() {
public void onSuccess() {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup( "Select the Report (or Template) to encrypt ", true, true);
wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT);
wpTreepopup.setSelectableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT);
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
final String itemId = event.getSelectedItem().getId();
ItemType[] types = {ItemType.REPORT_TEMPLATE, ItemType.REPORT};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select the Report (or Template) to encrypt", Arrays.asList(types), Arrays.asList(types));
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
final String itemId = item.getId();
final String url = GWT.getModuleBaseURL() + "downloadEncryptedReport?itemId=" + itemId;
Window.open(url, "_blank", "");
}
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
});
wpTreepopup.center();
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}
@ -843,29 +851,36 @@ public class Headerbar extends Composite{
GWT.runAsync(new RunAsyncCallback() {
@Override
public void onSuccess() {
int left = mainLayout.getAbsoluteLeft() + 50;
int top = mainLayout.getAbsoluteTop() + 25;
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Pick the item you want to import from", true, true);
wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE, ItemType.REPORT);
ItemType[] types = {ItemType.REPORT_TEMPLATE, ItemType.REPORT};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Pick the item you want to import from", Arrays.asList(types), Arrays.asList(types));
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
int left = mainLayout.getAbsoluteLeft() + 50;
int top = mainLayout.getAbsoluteTop() + 25;
ImporterDialog dlg = new ImporterDialog(event.getSelectedItem(), presenter);
ImporterDialog dlg = new ImporterDialog(item, presenter);
dlg.setPopupPosition(left, top);
dlg.setAnimationEnabled(true);
dlg.show();
}
presenter.getHeader().enableExports();
}
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
});
wpTreepopup.setPopupPosition(left, top);
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}
@Override

View File

@ -1,13 +1,15 @@
package org.gcube.portlets.user.reportgenerator.client.Presenter;
import java.util.Arrays;
import org.gcube.portlets.user.reportgenerator.client.ReportConstants;
import org.gcube.portlets.user.reportgenerator.client.dialog.ImporterDialog;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateModel;
import org.gcube.portlets.widgets.lighttree.client.ItemType;
import org.gcube.portlets.widgets.lighttree.client.event.PopupEvent;
import org.gcube.portlets.widgets.lighttree.client.event.PopupHandler;
import org.gcube.portlets.widgets.lighttree.client.load.WorkspaceLightTreeLoadPopup;
import org.gcube.portlets.widgets.lighttree.client.save.WorkspaceLightTreeSavePopup;
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSaveNotification.WorskpaceExplorerSaveNotificationListener;
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
import org.gcube.portlets.widgets.wsexplorer.client.save.WorkspaceExplorerSaveDialog;
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
import com.extjs.gxt.ui.client.event.ColorPaletteEvent;
import com.extjs.gxt.ui.client.event.Events;
@ -86,29 +88,30 @@ public class CommonCommands {
openTemplate = new Command() {
public void execute() {
final int left = presenter.getHeader().getMainLayout().getAbsoluteLeft() + 50;
final int top = presenter.getHeader().getMainLayout().getAbsoluteTop() + 25;
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
GWT.runAsync(WorkspaceExplorerSelectDialog.class, new RunAsyncCallback() {
public void onSuccess() {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Select a Template to open", true, true);
wpTreepopup.setWidth("450px");
wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE);
wpTreepopup.setSelectableTypes(ItemType.REPORT_TEMPLATE);
ItemType[] types = {ItemType.REPORT_TEMPLATE};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select a Template to open", Arrays.asList(types), Arrays.asList(types));
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
presenter.openTemplate(event.getSelectedItem().getName(), event.getSelectedItem().getId(), true);
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
presenter.openTemplate(item.getName(), item.getId(), true);
wpTreepopup.hide();
}
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
});
wpTreepopup.setPopupPosition(left, top);
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}
@ -121,28 +124,30 @@ public class CommonCommands {
openReport = new Command() {
public void execute() {
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
GWT.runAsync(WorkspaceExplorerSelectDialog.class, new RunAsyncCallback() {
public void onSuccess() {
int left = presenter.getHeader().getMainLayout().getAbsoluteLeft() + 50;
int top = presenter.getHeader().getMainLayout().getAbsoluteTop() + 25;
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Select a Report to open", true, true);
wpTreepopup.setWidth("450px");
wpTreepopup.setShowableTypes(ItemType.REPORT);
wpTreepopup.setSelectableTypes(ItemType.REPORT);
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
presenter.openTemplate(event.getSelectedItem().getName(), event.getSelectedItem().getId(), false);
}
presenter.getHeader().enableExports();
}
ItemType[] types = {ItemType.REPORT};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select a Report to open", Arrays.asList(types), Arrays.asList(types));
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
presenter.openTemplate(item.getName(), item.getId(), true);
wpTreepopup.hide();
}
});
wpTreepopup.setPopupPosition(left, top);
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}
@ -187,32 +192,36 @@ public class CommonCommands {
dlg.show();
}
else {
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
GWT.runAsync(WorkspaceExplorerSelectDialog.class, new RunAsyncCallback() {
public void onSuccess() {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Pick the item you want to import from", true, true);
wpTreepopup.setShowableTypes(ItemType.REPORT_TEMPLATE);
wpTreepopup.setWidth("450px");
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
ItemType[] types = {ItemType.REPORT_TEMPLATE};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Pick the item you want to import from", Arrays.asList(types), Arrays.asList(types));
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
int left = presenter.getHeader().getMainLayout().getAbsoluteLeft() + 50;
int top = presenter.getHeader().getMainLayout().getAbsoluteTop() + 25;
ImporterDialog dlg = new ImporterDialog(event.getSelectedItem(), presenter);
ImporterDialog dlg = new ImporterDialog(item, presenter);
dlg.setPopupPosition(left, top);
dlg.setAnimationEnabled(true);
dlg.show();
wpTreepopup.hide();
}
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
});
int left = presenter.getHeader().getMainLayout().getAbsoluteLeft() + 50;
int top = presenter.getHeader().getMainLayout().getAbsoluteTop() + 25;
wpTreepopup.setPopupPosition(left, top);
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}
public void onFailure(Throwable reason) {
@ -241,32 +250,39 @@ public class CommonCommands {
} //end constructor
public void saveReportAsDialog() {
final int left = presenter.getHeader().getMainLayout().getAbsoluteLeft() + 50;
final int top = presenter.getHeader().getMainLayout().getAbsoluteTop() + 25;
GWT.runAsync(WorkspaceLightTreeSavePopup.class, new RunAsyncCallback() {
GWT.runAsync(WorskpaceExplorerSaveNotificationListener.class, new RunAsyncCallback() {
public void onSuccess() {
WorkspaceLightTreeSavePopup wpTreepopup = new WorkspaceLightTreeSavePopup("Save Report, choose folder please:", true);
wpTreepopup.setWidth("450px");
wpTreepopup.setSelectableTypes( ItemType.FOLDER, ItemType.ROOT);
wpTreepopup.setShowEmptyFolders(true);
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
ItemType[] types = {ItemType.FOLDER};
final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Save Report, choose folder please:", Arrays.asList(types));
WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
@Override
public void onSaving(Item parent, String fileName) {
//checking user input
String inputUser = event.getName();
String inputUser = fileName;
String newTemplateName = inputUser;
if (presenter.getModel().getTemplateName().compareTo(newTemplateName) != 0) {
newTemplateName = newTemplateName.trim();
presenter.getModel().setTemplateName(newTemplateName+".d4sR");
}
presenter.changeTemplateName(newTemplateName);
presenter.saveReport(event.getSelectedItem().getId(), newTemplateName);
presenter.saveReport(parent.getId(), newTemplateName);
navigator.hide();
}
});
wpTreepopup.setPopupPosition(left, top);
wpTreepopup.show();
@Override
public void onAborted() {
GWT.log("onAborted");
}
@Override
public void onFailed(Throwable throwable) {
GWT.log("onFailed");
}
};
navigator.addWorkspaceExplorerSaveNotificationListener(listener);
navigator.show();
}
public void onFailure(Throwable reason) {

View File

@ -4,8 +4,8 @@ import org.gcube.portlets.d4sreporting.common.shared.Model;
import org.gcube.portlets.user.gcubewidgets.client.popup.GCubeDialog;
import org.gcube.portlets.user.reportgenerator.client.ReportConstants;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.widgets.lighttree.client.Item;
import org.gcube.portlets.widgets.lighttree.client.ItemType;
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;

View File

@ -1,6 +1,7 @@
package org.gcube.portlets.user.reportgenerator.client.targets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.gcube.portlets.d4sreporting.common.shared.BasicComponent;
@ -11,10 +12,10 @@ import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateComponent;
import org.gcube.portlets.user.reportgenerator.client.model.TemplateModel;
import org.gcube.portlets.user.reportgenerator.shared.ReportImage;
import org.gcube.portlets.widgets.lighttree.client.ItemType;
import org.gcube.portlets.widgets.lighttree.client.event.PopupEvent;
import org.gcube.portlets.widgets.lighttree.client.event.PopupHandler;
import org.gcube.portlets.widgets.lighttree.client.load.WorkspaceLightTreeLoadPopup;
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSelectNotification.WorskpaceExplorerSelectNotificationListener;
import org.gcube.portlets.widgets.wsexplorer.client.select.WorkspaceExplorerSelectDialog;
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
@ -364,26 +365,33 @@ public class ClientImage extends Composite {
}
private void openFileExplorer(final int left, final int top) {
GWT.runAsync(WorkspaceLightTreeLoadPopup.class, new RunAsyncCallback() {
GWT.runAsync(WorkspaceExplorerSelectDialog.class, new RunAsyncCallback() {
public void onSuccess() {
WorkspaceLightTreeLoadPopup wpTreepopup = new WorkspaceLightTreeLoadPopup("Select the Image", true, true);
wpTreepopup.setShowableTypes(ItemType.IMAGE_DOCUMENT, ItemType.EXTERNAL_IMAGE);
wpTreepopup.setSelectableTypes(ItemType.IMAGE_DOCUMENT, ItemType.EXTERNAL_IMAGE);
wpTreepopup.setWidth("450px");
wpTreepopup.addPopupHandler(new PopupHandler() {
public void onPopup(PopupEvent event) {
if (! event.isCanceled()) {
if (event.getSelectedItem() != null) {
if (event.getSelectedItem().getType() == ItemType.IMAGE_DOCUMENT)
fetchImage(event.getSelectedItem().getId(), true, true);
ItemType[] types = {ItemType.IMAGE_DOCUMENT, ItemType.EXTERNAL_IMAGE};
final WorkspaceExplorerSelectDialog wpTreepopup = new WorkspaceExplorerSelectDialog("Select the Image", Arrays.asList(types), Arrays.asList(types));
WorskpaceExplorerSelectNotificationListener listener = new WorskpaceExplorerSelectNotificationListener() {
@Override
public void onSelectedItem(Item item) {
if (item.getType() == ItemType.IMAGE_DOCUMENT)
fetchImage(item.getId(), true, true);
else
fetchImage(event.getSelectedItem().getId(), false, true);
fetchImage(item.getId(), false, true);
wpTreepopup.hide();
}
@Override
public void onFailed(Throwable throwable) {
Window.alert("There are networks problem, please check your connection.");
}
@Override
public void onAborted() {}
@Override
public void onNotValidSelection() {
}
});
wpTreepopup.center();
};
wpTreepopup.addWorkspaceExplorerSelectNotificationListener(listener);
wpTreepopup.show();
}

View File

@ -1,13 +1,15 @@
package org.gcube.portlets.user.reportgenerator.client.uibinder;
import org.gcube.portlets.widgets.exporter.shared.TypeExporter;
import java.util.Arrays;
import org.gcube.portlets.user.reportgenerator.client.ReportServiceAsync;
import org.gcube.portlets.user.reportgenerator.client.ToolboxPanel;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
import org.gcube.portlets.widgets.lighttree.client.ItemType;
import org.gcube.portlets.widgets.lighttree.client.event.PopupEvent;
import org.gcube.portlets.widgets.lighttree.client.event.PopupHandler;
import org.gcube.portlets.widgets.lighttree.client.save.WorkspaceLightTreeSavePopup;
import org.gcube.portlets.widgets.exporter.shared.TypeExporter;
import org.gcube.portlets.widgets.wsexplorer.client.notification.WorkspaceExplorerSaveNotification.WorskpaceExplorerSaveNotificationListener;
import org.gcube.portlets.widgets.wsexplorer.client.save.WorkspaceExplorerSaveDialog;
import org.gcube.portlets.widgets.wsexplorer.shared.Item;
import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
@ -104,14 +106,14 @@ public class ExportOptions extends Composite {
});
break;
case SAVE_AS:
WorkspaceLightTreeSavePopup wpTree = new WorkspaceLightTreeSavePopup("Save Report, select the folder:", true);
wpTree.setSelectableTypes(ItemType.FOLDER, ItemType.ROOT);
wpTree.setShowEmptyFolders(true);
wpTree.addPopupHandler(new PopupHandler(){
ItemType[] types = {ItemType.FOLDER};
final WorkspaceExplorerSaveDialog navigator = new WorkspaceExplorerSaveDialog("Save Report, choose folder please:", Arrays.asList(types));
WorskpaceExplorerSaveNotificationListener listener = new WorskpaceExplorerSaveNotificationListener(){
@Override
public void onPopup(PopupEvent event) {
rpc.save(filePath, event.getSelectedItem().getId(), event.getName(), type, true, new AsyncCallback<String>() {
public void onSaving(Item parent, String fileName) {
rpc.save(filePath, parent.getId(), fileName, type, true, new AsyncCallback<String>() {
@Override
public void onSuccess(String createdItemId) {
p.clearExportPanel();
@ -123,9 +125,21 @@ public class ExportOptions extends Composite {
Window.alert("Error: " + caught.getMessage());
}
});
}});
wpTree.show();
wpTree.center();
navigator.hide();
}
@Override
public void onAborted() {
GWT.log("onAborted");
}
@Override
public void onFailed(Throwable throwable) {
GWT.log("onFailed");
}
};
navigator.addWorkspaceExplorerSaveNotificationListener(listener);
navigator.show();
break;
case
SAVE_OPEN:

View File

@ -5,8 +5,8 @@
<inherits name='com.google.gwt.user.User' />
<!-- To Comment out -->
<set-property name="user.agent" value="safari,gecko1_8,ie9" />
<inherits
name='org.gcube.portlets.widgets.lighttree.WorkspacePortletLightTree' />
<!-- inherits WorkspaceExplorer widget -->
<inherits name='org.gcube.portlets.widgets.wsexplorer.WorkspaceExplorer' />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portlets.d4sreporting.common.Reporting' />
<inherits name='com.extjs.gxt.ui.GXT' />

View File

@ -8,7 +8,10 @@
<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />
<link type="text/css" rel="stylesheet" href="ReportGenerator.css">
<script type="text/javascript" language="javascript" src="reports/reports.nocache.js"></script>
<script src="reports/js/jquery-1.10.1.min.js"></script>
<script src="reports/js/bootstrap.min.js"></script>
<script type="text/javascript" src="reports/reports.nocache.js"></script>
</head>
<body>
<div id="ReportGeneratorDIV"></div>

View File

@ -9,5 +9,8 @@
--%>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/gxt/css/gxt-all.css" />
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/ReportGenerator.css" />
<script src='<%=request.getContextPath()%>/reports/js/jquery-1.10.1.min.js'></script>
<script src='<%=request.getContextPath()%>/reports/js/bootstrap.min.js'></script>
<script type="text/javascript" language="javascript" src="<%=request.getContextPath()%>/reports/reports.nocache.js"></script>
<div id="ReportGeneratorDIV"></div>

View File

@ -1,4 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="WebApp_ID" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
id="WebApp_ID" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>ReportGenerator-portlet</display-name>
<!-- Servlets -->
<servlet>
@ -11,25 +14,14 @@
<url-pattern>/reports/ReportServiceImpl</url-pattern>
</servlet-mapping>
<!-- quicktourServlet -->
<!-- <servlet> -->
<!-- <servlet-name>quicktourServlet</servlet-name> -->
<!-- <servlet-class>org.gcube.portlets.widgets.guidedtour.server.TourServiceImpl</servlet-class> -->
<!-- </servlet> -->
<!-- <servlet-mapping> -->
<!-- <servlet-name>quicktourServlet</servlet-name> -->
<!-- <url-pattern>/reports/quicktourServlet</url-pattern> -->
<!-- </servlet-mapping> -->
<servlet>
<servlet-name>WorkspaceLightService</servlet-name>
<servlet-class>org.gcube.portlets.widgets.lighttree.server.WorkspaceServiceImpl</servlet-class>
<servlet-name>workspaceExplorer</servlet-name>
<servlet-class>org.gcube.portlets.widgets.wsexplorer.server.WorkspaceExplorerServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WorkspaceLightService</servlet-name>
<url-pattern>/reports/WorkspaceLightService</url-pattern>
<servlet-name>workspaceExplorer</servlet-name>
<url-pattern>/reports/WorkspaceExplorerService</url-pattern>
</servlet-mapping>
@ -78,16 +70,6 @@
</servlet-mapping>
<!-- Fimes import expot part -->
<!--servlet> <servlet-name>fimesexporterServlet</servlet-name> <servlet-class>org.gube.portlets.user.reporting.fimesexporter.server.FimesExporterServiceImpl</servlet-class>
</servlet> <servlet-mapping> <servlet-name>fimesexporterServlet</servlet-name>
<url-pattern>/reportgenerator/exporter</url-pattern> </servlet-mapping -->
<!-- servlet> <servlet-name>fileUploaderServlet</servlet-name> <servlet-class>org.gcube.portlets.user.reporting.fimesimporter.server.FimesFileUploaderServlet</servlet-class>
</servlet> <servlet-mapping> <servlet-name>fileUploaderServlet</servlet-name>
<url-pattern>/reportgenerator/fimesfileuploaderservlet</url-pattern> </servlet-mapping -->
<servlet>
<servlet-name>convertServlet</servlet-name>
<servlet-class>org.gcube.portlets.widgets.exporter.server.ReportExporterServiceImpl</servlet-class>