Fixed Layout

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-json-export-widget@115538 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-06-25 12:30:06 +00:00 committed by Giancarlo Panichi
parent 49ea879e3f
commit 351a30ca19
7 changed files with 84 additions and 28 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/tabular-data-json-export-widget-1.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/tabular-data-json-export-widget-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-json-export-widget-1.2.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/tabular-data-json-export-widget-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -33,5 +33,5 @@
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-json-export-widget-1.2.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/tabular-data-json-export-widget-1.3.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -6,20 +6,20 @@
<Description>tabular-data-json-export-widget allows json export inside file and workspace</Description>
<Class>PortletsUser</Class>
<Name>tabular-data-json-export-widget</Name>
<Version>1.2.0-SNAPSHOT</Version>
<Version>1.3.0-SNAPSHOT</Version>
<Packages>
<Software>
<Description>tabular-data-json-export-widget allows json export inside file and workspace</Description>
<Name>tabular-data-json-export-widget</Name>
<Version>1.2.0-SNAPSHOT</Version>
<Version>1.3.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-json-export-widget</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
</MavenCoordinates>
<Type>library</Type>
<Files>
<File>tabular-data-json-export-widget-1.2.0-SNAPSHOT.jar</File>
<File>tabular-data-json-export-widget-1.3.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.2.0-SNAPSHOT (2015-04-30)
v. 1.3.0-SNAPSHOT (2015-07-03)
Description

View File

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

21
pom.xml
View File

@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-json-export-widget</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>
<name>tabular-data-json-export-widget</name>
<description>tabular-data-json-export-widget allows json 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>
@ -89,21 +89,7 @@
<version>${gwtVersion}</version>
</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>
@ -154,7 +140,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>

View File

@ -2,8 +2,15 @@ package org.gcube.portlets.user.td.jsonexportwidget.client;
import java.util.ArrayList;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
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.json.JSONExportSession;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.jsonexportwidget.client.grid.ColumnDataGridPanel;
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;
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
@ -11,6 +18,7 @@ import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.sencha.gxt.core.client.util.Padding;
import com.sencha.gxt.core.client.util.ToggleGroup;
@ -154,17 +162,72 @@ public class JSONExportConfigCard extends WizardCard {
} else {
exportSession.setColumns(columns);
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(
/*DestinationSelectionCard destCard = new DestinationSelectionCard(
exportSession);
getWizardWindow().addCard(destCard);
getWizardWindow().nextCard();*/
Log.info("NextCard JSONWorkspaceSelectionCard");
JSONWorkSpaceSelectionCard jsonWorkspaceSelectionCard = new JSONWorkSpaceSelectionCard(
exportSession);
getWizardWindow().addCard(
jsonWorkspaceSelectionCard);
getWizardWindow().nextCard();
} catch (Exception e) {
Log.error("sayNextCard :" + e.getLocalizedMessage());
}

View File

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