Minor update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-mainbox-widget@101782 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-11-28 17:59:24 +00:00 committed by Giancarlo Panichi
parent 08222ae60f
commit 2c2eca622f
5 changed files with 155 additions and 50 deletions

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.google.gdt.eclipse.suite.webapp">
<stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.DevMode"/>
<booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/>
<listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES">
<listEntry value="org.gcube.portlets.user.td.mainboxwidget.MainBox"/>
</listAttribute>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="MainBox.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/tabular-data-mainbox-widget"/>
@ -8,9 +12,36 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7&quot; javaProject=&quot;tabular-data-mainbox-widget&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.libs_3.8.0.v201410302155-rel-r44/libs/superdevmode-launcher-legacy.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;/home/giancarlo/.m2/repository/com/google/gwt/gwt-codeserver/2.6.1/gwt-codeserver-2.6.1.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry externalArchive=&quot;/home/giancarlo/.m2/repository/com/google/gwt/gwt-dev/2.6.1/gwt-dev-2.6.1.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-mainbox-widget/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-mainbox-widget/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-mainbox-widget/src/test/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-mainbox-widget/src/test/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-gwt-service/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-gwt-service/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-gwt-service/src/test/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-gwt-service/src/test/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widget-common-event/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widget-common-event/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widget-common-event/src/test/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widget-common-event/src/test/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx-tdx-source/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx-tdx-source/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx-tdx-source/src/test/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx-tdx-source/src/test/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx/src/main/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx/src/main/resources&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/tabular-data-widgetx/src/test/java&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;tabular-data-mainbox-widget&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -startupUrl MainBox.html -logLevel INFO -codeServerPort 9997 -port 8888 org.gcube.portlets.user.td.mainboxwidget.MainBox"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-nosuperDevMode -war /home/giancarlo/workspace2/tabular-data-mainbox-widget/target/tabular-data-mainbox-widget-1.0.0-SNAPSHOT -remoteUI &quot;${gwt_remote_ui_server_port}:${unique_id}&quot; -startupUrl MainBox.html -logLevel INFO -codeServerPort 9997 -port 8888 org.gcube.portlets.user.td.mainboxwidget.MainBox"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tabular-data-mainbox-widget"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m -Dgwt.nowarn.legacy.tools"/>
</launchConfiguration>

37
pom.xml
View File

@ -46,15 +46,14 @@
<configDirectory>config</configDirectory>
<!-- Convenience property to set the GWT version -->
<!-- <gwtVersion>2.5.1</gwtVersion>
<gwtLogVersion>3.2.1</gwtLogVersion>
<gxtVersion>3.0.1</gxtVersion> -->
<!-- <gwtVersion>2.5.1</gwtVersion> <gwtLogVersion>3.2.1</gwtLogVersion>
<gxtVersion>3.0.1</gxtVersion> -->
<!-- Next -->
<gwtVersion>2.6.1</gwtVersion>
<gwtLogVersion>3.3.2</gwtLogVersion>
<gxtVersion>3.1.1</gxtVersion>
<gxtVersion>3.1.1</gxtVersion>
<KEYS>${env.KEYS}</KEYS>
@ -78,15 +77,23 @@
<version>1.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.gcube.common</groupId>
<artifactId>home-library</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
@ -94,6 +101,8 @@
<version>${gwtVersion}</version>
</dependency>
<!-- GXT 3 -->
<dependency>
<groupId>com.sencha.gxt</groupId>
@ -101,30 +110,34 @@
<version>${gxtVersion}</version>
</dependency>
<!-- Portal -->
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-scope-maps</artifactId>
<version>[1.0.2-SNAPSHOT,2.0.0-SNAPSHOT)</version>
<scope>provided</scope>
<scope>compile</scope>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>org.gcube.portal</groupId>
<artifactId>custom-portal-handler</artifactId>
<scope>provided</scope>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>aslcore</artifactId>
<scope>provided</scope>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>accesslogger</artifactId>
<scope>provided</scope>
<!-- <scope>provided</scope> -->
</dependency>
@ -134,7 +147,7 @@
<groupId>org.gcube.data.analysis.tabulardata</groupId>
<artifactId>service-client-impl</artifactId>
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
<scope>provided</scope>
<!-- <scope>provided</scope> -->
</dependency>
@ -236,6 +249,7 @@
<goal>compile</goal>
<!-- <goal>test</goal> -->
<goal>resources</goal>
</goals>
</execution>
</executions>
@ -351,4 +365,5 @@
</dependencies>
</dependencyManagement>
<packaging>war</packaging>
</project>

View File

@ -2,7 +2,7 @@
<module rename-to='MainBox'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
@ -21,10 +21,7 @@
/> -->
<!-- <inherits name='org.gcube.portlets.user.td.resourceswidget.ResourcesWidget'
/> -->
<!-- Specify the app entry point class. -->
<!-- <entry-point
class='org.gcube.portlets.user.td.mainboxwidget.client.MainBoxEntry' /> -->
@ -32,5 +29,12 @@
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- allow Super Dev Mode -->
<!-- <add-linker name="xsiframe" />
<set-configuration-property name="devModeRedirectEnabled"
value="true" />
<set-property name="compiler.useSourceMaps" value="true"/> -->
</module>

View File

@ -1,6 +1,8 @@
package org.gcube.portlets.user.td.mainboxwidget.client;
import org.gcube.portlets.user.td.mainboxwidget.client.rpc.TabularDataServiceAsync;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.gwtservice.shared.user.UserInfo;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.UIStateEvent;
import org.gcube.portlets.user.td.widgetcommonevent.client.type.UIStateType;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
@ -22,33 +24,81 @@ import com.sencha.gxt.widget.core.client.container.Viewport;
*/
public class MainBoxEntry implements EntryPoint {
protected static final String JSP_TAG_ID = "tdp";
private TRId trId;
private TabResource tabResource;
public void onModuleLoad() {
TabularDataServiceAsync.INSTANCE.hello(new AsyncCallback<String>() {
@Override
public void onSuccess(String result) {
loadDataView();
}
// For example Tabular Resource 7 and table 402
//trId = new TRId("58", TabResourceType.STANDARD, "1283");
//trId = new TRId("77", TabResourceType.STANDARD, "1560");
trId = new TRId("80", TabResourceType.STANDARD, "1757");
TDGWTServiceAsync.INSTANCE.hello(new AsyncCallback<UserInfo>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in hello(): "+caught);
caught.printStackTrace();
}
@Override
public void onSuccess(UserInfo result) {
Log.debug("Hello "+result);
retrieveTabularResource();
}
});
}
public void retrieveTabularResource(){
TDGWTServiceAsync.INSTANCE.getTabResourceInformation(trId, new AsyncCallback<TabResource>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in retrieveTabularResource(): "+caught);
caught.printStackTrace();
}
@Override
public void onSuccess(TabResource result) {
Log.debug("TabResource Retrieved: "+result);
tabResource=result;
addInSession();
}
});
}
public void addInSession(){
TDGWTServiceAsync.INSTANCE.setTabResource(tabResource,new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
Log.error("Error in addInSession(): "+caught);
caught.printStackTrace();
}
@Override
public void onSuccess(Void result) {
Log.debug("TabResource Set");
loadDataView();
}
});
}
protected void loadDataView() {
// For example Tabular Resource 7 and table 402
TRId trId1 = new TRId("220", TabResourceType.STANDARD, "3555");
TRId trId2 = new TRId("219", TabResourceType.STANDARD, "3507");
TRId trId3 = new TRId("168", TabResourceType.STANDARD, "2165");
EventBus eventBus = new SimpleEventBus();
try {
@ -59,16 +109,9 @@ public class MainBoxEntry implements EntryPoint {
UIStateEvent uiStateEvent1 = new UIStateEvent(UIStateType.TR_OPEN);
uiStateEvent1.setTrId(trId1);
uiStateEvent1.setTrId(trId);
eventBus.fireEvent(uiStateEvent1);
UIStateEvent uiStateEvent2 = new UIStateEvent(UIStateType.TR_OPEN);
uiStateEvent2.setTrId(trId2);
eventBus.fireEvent(uiStateEvent2);
UIStateEvent uiStateEvent3 = new UIStateEvent(UIStateType.TR_OPEN);
uiStateEvent3.setTrId(trId3);
eventBus.fireEvent(uiStateEvent3);
Log.info("MainBoxPanel Added:" + mainBoxPanel);
} catch (Throwable e) {

View File

@ -5,32 +5,44 @@
<!-- Other module inherits -->
<inherits name='com.sencha.gxt.ui.GXT' />
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<!-- <inherits name="com.extjs.gxt.ui.GXT" /> -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
<!-- We need the JUnit module in the main module, -->
<!-- otherwise eclipse complains (Google plugin bug?) -->
<inherits name='com.google.gwt.junit.JUnit' />
<inherits name="org.gcube.portlets.user.tdwx.TabularDataWidgetX" />
<inherits
name='org.gcube.portlets.user.td.widgetcommonevent.WidgetCommonEvent' />
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
<!-- <inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' /> -->
<!-- <inherits name='org.gcube.portlets.user.td.resourceswidget.ResourcesWidget' /> -->
<!-- <inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD'
/> -->
<!-- <inherits name='org.gcube.portlets.user.td.resourceswidget.ResourcesWidget'
/> -->
<!-- Specify the app entry point class. -->
<!-- <entry-point class='org.gcube.portlets.user.td.mainboxwidget.client.MainBoxEntry'
/> -->
<entry-point
class='org.gcube.portlets.user.td.mainboxwidget.client.MainBoxEntry' />
<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- allow Super Dev Mode -->
<!--
<add-linker name="xsiframe" />
<set-configuration-property name="devModeRedirectEnabled"
value="true" />
<set-property name="compiler.useSourceMaps" value="true"/>
-->
</module>