Minor Updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@113804 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-03-30 16:04:26 +00:00
parent f675d9c37f
commit 1acfaa9e72
2 changed files with 44 additions and 5 deletions

11
pom.xml
View File

@ -76,6 +76,7 @@
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
@ -128,7 +129,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-gwt-service</artifactId>
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
<!-- tabular-data-widget-common-event -->
@ -136,7 +137,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-widget-common-event</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
<!-- TD Expression -->
@ -144,7 +145,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-expression-widget</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
@ -153,7 +154,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-widgetx-tdx-source</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
<!-- tabular-data-monitor-widget -->
@ -161,7 +162,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-monitor-widget</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<!-- <scope>provided</scope> -->
<scope>provided</scope>
</dependency>
<!-- LOGGING -->

View File

@ -3,11 +3,16 @@ package org.gcube.portlets.user.td.columnwidget.client;
import org.gcube.portlets.user.td.columnwidget.client.create.AddColumnPanel;
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
import org.gcube.portlets.user.td.gwtservice.shared.user.UserInfo;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.TabResourceType;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;
@ -22,6 +27,11 @@ public class ColumnWidgetEntry implements EntryPoint {
public void onModuleLoad() {
callHello();
}
protected void test(){
EventBus eventBus= new SimpleEventBus();
TRId trId=new TRId("86",TabResourceType.STANDARD, "1159");
@ -50,5 +60,33 @@ public class ColumnWidgetEntry implements EntryPoint {
RootPanel.get().add(addColumnPanel);
Log.info("Hello!");
}
protected void callHello() {
TDGWTServiceAsync.INSTANCE.hello(new AsyncCallback<UserInfo>() {
@Override
public void onFailure(Throwable caught) {
Log.info("No valid user found: " + caught.getMessage());
if (caught instanceof TDGWTSessionExpiredException) {
UtilsGXT3.alert("Error", "Expired Session");
} else {
UtilsGXT3.alert("Error", "No user found");
}
}
@Override
public void onSuccess(UserInfo result) {
Log.info("Hello: " + result.getUsername());
}
});
}
}