Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@90890 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-02-04 17:53:50 +00:00
parent 47b34ff37e
commit 27df4545a3
15 changed files with 336 additions and 78 deletions

View File

@ -22,6 +22,18 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/gwt-user.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/doc/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/gwt-dev.jar">
<attributes>
<attribute name="javadoc_location" value="file:/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/doc/javadoc/"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA.jar" sourcepath="/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="lib" path="/home/giancarlo/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1/validation-api-1.0.0.GA-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
@ -30,7 +42,6 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>

View File

@ -382,3 +382,131 @@ Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
20% complete (ETR: 13 seconds)
20% complete (ETR: 13 seconds)
20% complete (ETR: 13 seconds)
30% complete (ETR: 13 seconds)
40% complete (ETR: 9 seconds)
50% complete (ETR: 7 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 4 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 17.20 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
30% complete (ETR: 11 seconds)
40% complete (ETR: 10 seconds)
50% complete (ETR: 8 seconds)
60% complete (ETR: 5 seconds)
70% complete (ETR: 4 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 27.33 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
40% complete (ETR: 6 seconds)
50% complete (ETR: 5 seconds)
60% complete (ETR: 4 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 14.33 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 0 cached/archived units. Used 0 / 2719 units from cache.
Compiling...
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
40% complete (ETR: 7 seconds)
50% complete (ETR: 6 seconds)
60% complete (ETR: 4 seconds)
70% complete (ETR: 3 seconds)
80% complete (ETR: 2 seconds)
90% complete (ETR: 1 seconds)
100% complete (ETR: 0 seconds)
Compilation completed in 11.53 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes
Public resources found in...
Translatable source found in...
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
Compiling...
Compilation completed in 0.00 seconds
Removing invalidated units
Finding entry point classes

View File

@ -1,8 +1,88 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -7,9 +7,6 @@
<dependent-module archiveName="tabular-data-gwt-service-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-gwt-service/tabular-data-gwt-service">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-model-3.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-model/tabular-model">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="tabular-data-widget-common-event-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event">
<dependency-type>uses</dependency-type>
</dependent-module>

19
ColumnWidget.launch Normal file
View File

@ -0,0 +1,19 @@
<?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"/>
<stringAttribute key="com.google.gwt.eclipse.core.URL" value="ColumnWidget.html"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/tabular-data-column-widget"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="GLOBUS_LOCATION" value="${GLOBUS_LOCATION}"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="com.google.gdt.eclipse.maven.mavenClasspathProvider"/>
<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 ColumnWidget.html -logLevel INFO -codeServerPort 9997 -port 8888 -war /home/giancarlo/workspace/tabular-data-column-widget/target/tabular-data-column-widget-1.0.0-SNAPSHOT org.gcube.portlets.user.td.columnwidget.ColumnWidget"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="tabular-data-column-widget"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m -Dgwt.nowarn.legacy.tools"/>
</launchConfiguration>

46
pom.xml
View File

@ -14,15 +14,15 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-column-widget</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>tabular-data-column-widget</name>
<description>tabular-data-column-widget allows to perform operations on the columns of a tabular resource</description>
<scm>
<url>https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget</url>
</scm>
<developers>
<developer>
<name>Giancarlo Panichi</name>
@ -34,7 +34,7 @@
</roles>
</developer>
</developers>
<properties>
<distroDirectory>${project.basedir}/distro</distroDirectory>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
@ -42,7 +42,7 @@
<templatesDirectory>templates</templatesDirectory>
<distroDirectory>distro</distroDirectory>
<configDirectory>config</configDirectory>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<!-- To make this work on gwt-run you need to set up global env vars. on
@ -53,9 +53,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<profiles>
<profile>
<id>localRun</id>
@ -74,8 +74,8 @@
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
@ -85,8 +85,8 @@
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
@ -107,15 +107,7 @@
<version>3.0.1</version>
</dependency>
<!-- tabular-data-wizard-widget
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-wizard-widget</artifactId>
<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
</dependency>
-->
<!-- tabular-data-gwt-service -->
<dependency>
<groupId>org.gcube.portlets.user</groupId>
@ -123,6 +115,7 @@
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
</dependency>
<!-- LOGGING -->
<dependency>
@ -135,7 +128,7 @@
<artifactId>slf4j-api</artifactId>
<!-- <scope>compile</scope> -->
</dependency>
<!-- JUNIT -->
<dependency>
<groupId>junit</groupId>
@ -143,8 +136,8 @@
<version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -160,7 +153,7 @@
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -178,7 +171,7 @@
</dependency>
</dependencies>
</plugin>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
@ -197,7 +190,7 @@
<module>org.gcube.portlets.user.td.columnwidget.ColumnWidget</module>
</configuration>
</plugin>
<!-- Maven -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
@ -301,5 +294,4 @@
</dependency>
</dependencies>
</dependencyManagement>
<packaging>war</packaging>
</project>

View File

@ -22,7 +22,7 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.user.td.columnwidget.client.ColumnWidgetEntry' />
<!-- <entry-point class='org.gcube.portlets.user.td.columnwidget.client.ColumnWidgetEntry' /> -->
<!-- Specify the paths for translatable code -->
<source path='client' />

View File

@ -1,5 +1,6 @@
package org.gcube.portlets.user.td.columnwidget.client;
import com.google.web.bindery.event.shared.EventBus;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
@ -16,15 +17,15 @@ public class ChangeColumnTypeDialog extends Window {
protected ColumnData column=null;
protected ComboBox<ColumnData> combo=null;
public ChangeColumnTypeDialog(TRId trId) {
create(trId, null);
public ChangeColumnTypeDialog(TRId trId, EventBus eventBus) {
create(trId, null, eventBus);
}
public ChangeColumnTypeDialog(TRId trId, String columnName) {
create(trId, columnName);
public ChangeColumnTypeDialog(TRId trId, String columnName, EventBus eventBus) {
create(trId, columnName, eventBus);
}
protected void create(TRId trId, String columnName) {
protected void create(TRId trId, String columnName, EventBus eventBus) {
setWidth(WIDTH);
setHeight(HEIGHT);
setBodyBorder(false);
@ -34,7 +35,7 @@ public class ChangeColumnTypeDialog extends Window {
this.trId=trId;
this.columnName=columnName;
ChangeColumnTypePanel changeColumnTypePanel= new ChangeColumnTypePanel(trId, columnName);
ChangeColumnTypePanel changeColumnTypePanel= new ChangeColumnTypePanel(trId, columnName, eventBus);
add(changeColumnTypePanel);

View File

@ -24,6 +24,7 @@ import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.web.bindery.event.shared.EventBus;
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
import com.sencha.gxt.core.client.util.Margins;
import com.sencha.gxt.data.client.loader.RpcProxy;
@ -35,9 +36,12 @@ import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
import com.sencha.gxt.data.shared.loader.ListLoader;
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
import com.sencha.gxt.widget.core.client.FramedPanel;
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.button.TextButton;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
import com.sencha.gxt.widget.core.client.event.HideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
import com.sencha.gxt.widget.core.client.form.ComboBox;
import com.sencha.gxt.widget.core.client.form.FieldLabel;
import com.sencha.gxt.widget.core.client.form.TextField;
@ -46,7 +50,7 @@ import com.sencha.gxt.widget.core.client.info.Info;
public class ChangeColumnTypePanel extends FramedPanel {
protected String WIDTH = "640px";
protected String HEIGHT = "520px";
protected EventBus eventBus;
protected ChangeColumnTypeDialog parent;
protected TextField label = null;
protected TRId trId;
@ -61,13 +65,14 @@ public class ChangeColumnTypePanel extends FramedPanel {
protected TextField labelColumn;
public ChangeColumnTypePanel(TRId trId, String columnName) {
public ChangeColumnTypePanel(TRId trId, String columnName, EventBus eventBus) {
setWidth(WIDTH);
setHeight(HEIGHT);
setHeaderVisible(false);
setBodyBorder(false);
this.trId = trId;
this.columnName = columnName;
this.eventBus = eventBus;
ColumnDataProperties propsColumnData = GWT
.create(ColumnDataProperties.class);
@ -75,6 +80,7 @@ public class ChangeColumnTypePanel extends FramedPanel {
propsColumnData.id());
Log.trace("StoreCombo created");
RpcProxy<ListLoadConfig, ListLoadResult<ColumnData>> proxy = new RpcProxy<ListLoadConfig, ListLoadResult<ColumnData>>() {
public void load(ListLoadConfig loadConfig,
@ -104,13 +110,13 @@ public class ChangeColumnTypePanel extends FramedPanel {
Log.trace("Combo ColumnData created");
addHandlersForEventObservation(comboColumn, propsColumnData.label());
comboColumn.setLoader(loader);
comboColumn.setEmptyText("Select a column...");
comboColumn.setWidth(150);
comboColumn.setTypeAhead(true);
comboColumn.setEditable(true);
comboColumn.setTriggerAction(TriggerAction.ALL);
comboColumn.setLoader(loader);
// comboColumnTypeCode
ColumnTypeCodeProperties propsColumnTypeCode = GWT
@ -310,12 +316,25 @@ public class ChangeColumnTypePanel extends FramedPanel {
protected void loadData(ListLoadConfig loadConfig,
final AsyncCallback<ListLoadResult<ColumnData>> callback) {
TDGWTServiceAsync.INSTANCE.getColumns(trId,
new AsyncCallback<ArrayList<ColumnData>>() {
public void onFailure(Throwable caught) {
Log.error("load combo failure:"
+ caught.getLocalizedMessage());
AlertMessageBox d = new AlertMessageBox("Error", "Error retrieving columns of tabular resource:"+trId.getId());
d.addHideHandler(new HideHandler() {
public void onHide(HideEvent event) {
}
});
d.show();
callback.onFailure(caught);
}

View File

@ -2,20 +2,47 @@ package org.gcube.portlets.user.td.columnwidget.client;
import org.gcube.portlets.user.td.columnwidget.client.combo.DialogCodelistSelection;
import java.util.ArrayList;
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
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.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;
public class ColumnWidgetEntry implements EntryPoint {
public void onModuleLoad() {
/*TRId trId=new TRId();
//For example Tabular Resource 1 and table 1
trId.setId("1");
trId.setTableId("1");
EventBus eventBus= new SimpleEventBus();
TRId trId=new TRId();
//For example Tabular Resource 1 and table 1
trId.setId("7");
trId.setTableId("402");
TDGWTServiceAsync.INSTANCE.getColumns(trId, new AsyncCallback<ArrayList<ColumnData>>() {
public void onFailure(Throwable caught) {
Log.error("Error:"+caught.getMessage());
caught.printStackTrace();
}
public void onSuccess(ArrayList<ColumnData> result) {
Log.debug("Result:"+result.size());
}
});
/*
RemoveColumnDialog dialog=new RemoveColumnDialog(trId);
dialog.show();
ChangeLabelColumnDialog changeLabel=new ChangeLabelColumnDialog(trId);
@ -23,12 +50,12 @@ public class ColumnWidgetEntry implements EntryPoint {
ChangeToAnnotationColumnDialog changeToAnnotation=new ChangeToAnnotationColumnDialog(trId);
changeToAnnotation.show();
ChangeColumnTypeDialog changeColumnType=new ChangeColumnTypeDialog(trId);
ChangeColumnTypeDialog changeColumnType=new ChangeColumnTypeDialog(trId,eventBus);
changeColumnType.show();
*/
DialogCodelistSelection dcs=new DialogCodelistSelection();
dcs.show();
/*DialogCodelistSelection dcs=new DialogCodelistSelection();
dcs.show();
*/
Log.info("Hello!");
}
}

View File

@ -15,13 +15,5 @@ public interface ColumnDataProperties extends
LabelProvider<ColumnData> label();
/*
ValueProvider<ColumnData, String> name();
ValueProvider<ColumnData, String> typeName();
ValueProvider<ColumnData, String> typeCode();
*/
}

View File

@ -1,23 +1,18 @@
package org.gcube.portlets.user.td.columnwidget.client.properties;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnDataTypeElement;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
public interface ColumnDataTypeProperties extends
PropertyAccess<ColumnDataTypeElement> {
@Path("id")
ModelKeyProvider<ColumnDataTypeElement> id();
LabelProvider<ColumnDataTypeElement> label();
}

View File

@ -1,21 +1,18 @@
package org.gcube.portlets.user.td.columnwidget.client.properties;
import org.gcube.portlets.user.td.columnwidget.client.store.ColumnTypeCodeElement;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
public interface ColumnTypeCodeProperties extends
PropertyAccess<ColumnTypeCodeElement> {
@Path("id")
ModelKeyProvider<ColumnTypeCodeElement> id();
LabelProvider<ColumnTypeCodeElement> label();
}

View File

@ -22,7 +22,7 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.user.td.columnwidget.client.ColumnWidgetEntry' />
<!-- <entry-point class='org.gcube.portlets.user.td.columnwidget.client.ColumnWidgetEntry' /> -->
<!-- Specify the paths for translatable code -->
<source path='client' />

View File

@ -24,7 +24,7 @@
<!-- If you add any GWT meta tags, they must -->
<!-- be added before this line. -->
<!-- -->
<script type="text/javascript" language="javascript" src="ColumnWidget/ColumnWidget.nocache.js"></script>
<script type="text/javascript" src="ColumnWidget/ColumnWidget.nocache.js"></script>
</head>
<!-- -->