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> <Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
<Class>PortletsUser</Class> <Class>PortletsUser</Class>
<Name>tabular-data-csv-export-widget</Name> <Name>tabular-data-csv-export-widget</Name>
<Version>1.6.0-SNAPSHOT</Version> <Version>1.7.0-SNAPSHOT</Version>
<Packages> <Packages>
<Software> <Software>
<Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description> <Description>tabular-data-csv-export-widget allows csv export inside file and workspace</Description>
<Name>tabular-data-csv-export-widget</Name> <Name>tabular-data-csv-export-widget</Name>
<Version>1.6.0-SNAPSHOT</Version> <Version>1.7.0-SNAPSHOT</Version>
<MavenCoordinates> <MavenCoordinates>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-csv-export-widget</artifactId> <artifactId>tabular-data-csv-export-widget</artifactId>
<version>1.6.0-SNAPSHOT</version> <version>1.7.0-SNAPSHOT</version>
</MavenCoordinates> </MavenCoordinates>
<Type>library</Type> <Type>library</Type>
<Files> <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> </Files>
</Software> </Software>
</Packages> </Packages>

View File

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

View File

@ -1,4 +1,9 @@
<ReleaseNotes> <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" <Changeset component="org.gcube.portlets.user.tabular-data-csv-export-widget.1-6-0"
date="2015-04-30"> date="2015-04-30">
<Change>Updated dependency</Change> <Change>Updated dependency</Change>

22
pom.xml
View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-csv-export-widget</artifactId> <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> <name>tabular-data-csv-export-widget</name>
<description>tabular-data-csv-export-widget allows csv export inside file and workspace</description> <description>tabular-data-csv-export-widget allows csv export inside file and workspace</description>
@ -37,7 +37,7 @@
<properties> <properties>
<distroDirectory>${project.basedir}/distro</distroDirectory> <distroDirectory>${project.basedir}/distro</distroDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory> <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> <wikiurl>https://gcube.wiki.gcube-system.org/gcube/index.php/Tabular_Data_Manager</wikiurl>
<templatesDirectory>templates</templatesDirectory> <templatesDirectory>templates</templatesDirectory>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
@ -88,20 +88,6 @@
</dependency> </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> <dependency>
<groupId>com.sencha.gxt</groupId> <groupId>com.sencha.gxt</groupId>
<artifactId>gxt</artifactId> <artifactId>gxt</artifactId>
@ -152,7 +138,6 @@
<dependency> <dependency>
<groupId>org.gcube.common</groupId> <groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId> <artifactId>home-library</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -184,9 +169,6 @@
</dependencies> </dependencies>
<build> <build>
<!-- Generate compiled stuff in the folder used for developing mode --> <!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory> <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.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.csv.AvailableCharsetList; 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.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.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.event.SessionExpiredEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType; import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnData; 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.setEncoding(encodings.getCurrentValue());
exportSession.setSeparator(String.valueOf(getSelectedDelimiter())); exportSession.setSeparator(String.valueOf(getSelectedDelimiter()));
exportSession.setExportViewColumns(getExportViewColumns()); 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() { protected void goNext() {
try { try {
DestinationSelectionCard destCard = new DestinationSelectionCard( //Enable this for multi destination selection
/*DestinationSelectionCard destCard = new DestinationSelectionCard(
exportSession); exportSession);
getWizardWindow().addCard(destCard); getWizardWindow().addCard(destCard);
getWizardWindow().nextCard();*/
Log.info("NextCard CSVWorkspaceSelectionCard");
CSVWorkSpaceSelectionCard csvWorkspaceSelectionCard = new CSVWorkSpaceSelectionCard(
exportSession);
getWizardWindow().addCard(
csvWorkspaceSelectionCard);
getWizardWindow().nextCard(); getWizardWindow().nextCard();
} catch (Exception e) { } catch (Exception e) {
Log.error("sayNextCard :" + e.getLocalizedMessage()); Log.error("sayNextCard :" + e.getLocalizedMessage());
} }

View File

@ -1,4 +1,9 @@
<ReleaseNotes> <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" <Changeset component="${groupId}.${artifactId}.1-6-0"
date="2015-04-30"> date="2015-04-30">
<Change>Updated dependency</Change> <Change>Updated dependency</Change>