Updated Layout

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-csv-export-widget@115527 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-25 10:15:24 +00:00
parent 4d4ac7ac65
commit 81ad099ac7
6 changed files with 77 additions and 27 deletions

View File

@ -6,20 +6,20 @@
<Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
<Class>PortletsUser</Class>
<Name>tabular-data-csv-export-widget</Name>
<Version>1.6.0-SNAPSHOT</Version>
<Version>1.7.0-SNAPSHOT</Version>
<Packages>
<Software>
<Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
<Name>tabular-data-csv-export-widget</Name>
<Version>1.6.0-SNAPSHOT</Version>
<Version>1.7.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-csv-export-widget</artifactId>
<version>1.6.0-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
</MavenCoordinates>
<Type>library</Type>
<Files>
<File>tabular-data-csv-export-widget-1.6.0-SNAPSHOT.jar</File>
<File>tabular-data-csv-export-widget-1.7.0-SNAPSHOT.jar</File>
</Files>
</Software>
</Packages>

View File

@ -13,7 +13,7 @@ Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
Version and Release Date
------------------------
v. 1.6.0-SNAPSHOT (2015-04-30)
v. 1.7.0-SNAPSHOT (2015-07-03)
Description

View File

@ -1,4 +1,9 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets.user.tabular-data-csv-export-widget.1-7-0"
date="2015-07-03">
<Change>Fixed Layout</Change>
<Change>Updated dependencies</Change>
</Changeset>
<Changeset component="org.gcube.portlets.user.tabular-data-csv-export-widget.1-6-0"
date="2015-04-30">
<Change>Updated dependency</Change>

22
pom.xml
View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-csv-export-widget</artifactId>
<version>1.6.0-SNAPSHOT</version>
<version>1.7.0-SNAPSHOT</version>
<name>tabular-data-csv-export-widget</name>
<description>tabular-data-csv-export-widget allows csv export inside file and workspace</description>
@ -37,7 +37,7 @@
<properties>
<distroDirectory>${project.basedir}/distro</distroDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<release.date>2015-04-30</release.date>
<release.date>2015-07-03</release.date>
<wikiurl>https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager</wikiurl>
<templatesDirectory>templates</templatesDirectory>
<distroDirectory>distro</distroDirectory>
@ -88,20 +88,6 @@
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId>
@ -152,7 +138,6 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
</dependency>
<dependency>
@ -184,9 +169,6 @@
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>

View File

@ -6,7 +6,10 @@ import org.gcube.portlets.user.td.csvexportwidget.client.grid.ColumnDataGridPane
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.csv.AvailableCharsetList;
import org.gcube.portlets.user.td.gwtservice.shared.csv.CSVExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.destination.WorkspaceDestination;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData;
@ -310,17 +313,72 @@ public class CSVExportConfigCard extends WizardCard {
exportSession.setEncoding(encodings.getCurrentValue());
exportSession.setSeparator(String.valueOf(getSelectedDelimiter()));
exportSession.setExportViewColumns(getExportViewColumns());
goNext();
useWorkspaceDestination();
}
}
protected void useWorkspaceDestination(){
final WorkspaceDestination workspaceDestination = WorkspaceDestination.INSTANCE;
exportSession.setDestination(workspaceDestination);
retrieveTabularResource();
}
protected void retrieveTabularResource() {
TDGWTServiceAsync.INSTANCE
.getTabResourceInformation(new AsyncCallback<TabResource>() {
public void onSuccess(TabResource result) {
Log.info("Retrived TR: " + result.getTrId());
exportSession.setTabResource(result);
goNext();
}
public void onFailure(Throwable caught) {
if (caught instanceof TDGWTSessionExpiredException) {
getEventBus()
.fireEvent(
new SessionExpiredEvent(
SessionExpiredType.EXPIREDONSERVER));
} else {
if (caught instanceof TDGWTIsLockedException) {
Log.error(caught.getLocalizedMessage());
showErrorAndHide("Error Locked",
caught.getLocalizedMessage(), "",
caught);
} else {
showErrorAndHide(
"Error",
"Error retrienving tabular resource info: ",
caught.getLocalizedMessage(), caught);
}
}
}
});
}
protected void goNext() {
try {
DestinationSelectionCard destCard = new DestinationSelectionCard(
//Enable this for multi destination selection
/*DestinationSelectionCard destCard = new DestinationSelectionCard(
exportSession);
getWizardWindow().addCard(destCard);
getWizardWindow().nextCard();*/
Log.info("NextCard CSVWorkspaceSelectionCard");
CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard(
exportSession);
getWizardWindow().addCard(
csvWorkspaceSelectionCard);
getWizardWindow().nextCard();
} catch (Exception e) {
Log.error("sayNextCard :" + e.getLocalizedMessage());
}

View File

@ -1,4 +1,9 @@
<ReleaseNotes>
<Changeset component="${groupId}.${artifactId}.1-7-0"
date="2015-07-03">
<Change>Fixed Layout</Change>
<Change>Updated dependencies</Change>
</Changeset>
<Changeset component="${groupId}.${artifactId}.1-6-0"
date="2015-04-30">
<Change>Updated dependency</Change>