Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@90470 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bba30e3bc0
commit
ca7f76b5e6
|
@ -158,3 +158,35 @@ Compiling...
|
||||||
Compilation completed in 0.00 seconds
|
Compilation completed in 0.00 seconds
|
||||||
Removing invalidated units
|
Removing invalidated units
|
||||||
Finding entry point classes
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 0 cached/archived units. Used 0 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
60% complete (ETR: 2 seconds)
|
||||||
|
70% complete (ETR: 2 seconds)
|
||||||
|
80% complete (ETR: 1 seconds)
|
||||||
|
90% complete (ETR: 1 seconds)
|
||||||
|
100% complete (ETR: 0 seconds)
|
||||||
|
Compilation completed in 10.68 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
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<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>
|
||||||
<property name="context-root" value="tabular-data-column-widget"/>
|
<property name="context-root" value="tabular-data-column-widget"/>
|
||||||
<property name="java-output-path" value="/tabular-data-column-widget/target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
<property name="java-output-path" value="/tabular-data-column-widget/target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>
|
||||||
</wb-module>
|
</wb-module>
|
||||||
|
|
|
@ -2,9 +2,11 @@ package org.gcube.portlets.user.td.columnwidget.client;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
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.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.tr.column.ColumnTypeCode;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
|
@ -38,13 +40,15 @@ import com.sencha.gxt.widget.core.client.info.Info;
|
||||||
public class ChangeColumnTypePanel extends FramedPanel {
|
public class ChangeColumnTypePanel extends FramedPanel {
|
||||||
protected String WIDTH = "640px";
|
protected String WIDTH = "640px";
|
||||||
protected String HEIGHT = "520px";
|
protected String HEIGHT = "520px";
|
||||||
|
|
||||||
protected ChangeColumnTypeDialog parent;
|
protected ChangeColumnTypeDialog parent;
|
||||||
protected TextField label=null;
|
protected TextField label = null;
|
||||||
protected TRId trId;
|
protected TRId trId;
|
||||||
protected String columnName;
|
protected String columnName;
|
||||||
protected ColumnData column;
|
protected ColumnData column;
|
||||||
protected ComboBox<ColumnData> combo=null;
|
protected ComboBox<ColumnData> comboColumn = null;
|
||||||
|
protected ComboBox<ColumnTypeCode> comboTypeColumn = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public ChangeColumnTypePanel(TRId trId, String columnName){
|
public ChangeColumnTypePanel(TRId trId, String columnName){
|
||||||
|
@ -76,9 +80,8 @@ public class ChangeColumnTypePanel extends FramedPanel {
|
||||||
Log.trace("Loader created");
|
Log.trace("Loader created");
|
||||||
|
|
||||||
|
|
||||||
combo = new ComboBox<ColumnData>(store,
|
comboColumn = new ComboBox<ColumnData>(store, props.label()){
|
||||||
props.label()){
|
|
||||||
@Override
|
|
||||||
protected void onAfterFirstAttach() {
|
protected void onAfterFirstAttach() {
|
||||||
super.onAfterFirstAttach();
|
super.onAfterFirstAttach();
|
||||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||||
|
@ -90,21 +93,28 @@ public class ChangeColumnTypePanel extends FramedPanel {
|
||||||
};
|
};
|
||||||
Log.trace("Combo created");
|
Log.trace("Combo created");
|
||||||
|
|
||||||
addHandlersForEventObservation(combo, props.label());
|
addHandlersForEventObservation(comboColumn, props.label());
|
||||||
|
|
||||||
combo.setEmptyText("Select a column...");
|
comboColumn.setEmptyText("Select a column...");
|
||||||
combo.setWidth(150);
|
comboColumn.setWidth(150);
|
||||||
combo.setTypeAhead(true);
|
comboColumn.setTypeAhead(true);
|
||||||
combo.setTriggerAction(TriggerAction.ALL);
|
comboColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
combo.setLoader(loader);
|
comboColumn.setLoader(loader);
|
||||||
|
|
||||||
FramedPanel form = new FramedPanel();
|
FramedPanel form = new FramedPanel();
|
||||||
form.setHeaderVisible(false);
|
form.setHeaderVisible(false);
|
||||||
//form.setWidth(350);
|
//form.setWidth(350);
|
||||||
form.setBodyStyle("background: none;");
|
form.setBodyStyle("background: none;");
|
||||||
|
|
||||||
|
TextField labelColumn=new TextField();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||||
v.add(new FieldLabel(combo, "Column"), new VerticalLayoutData(1, -1));
|
v.add(new FieldLabel(comboColumn, "Column"), new VerticalLayoutData(1, -1));
|
||||||
|
v.add(new FieldLabel(labelColumn, "Label"), new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
form.add(v);
|
form.add(v);
|
||||||
form.addButton(new TextButton("Change"));
|
form.addButton(new TextButton("Change"));
|
||||||
|
|
||||||
|
@ -126,7 +136,7 @@ public class ChangeColumnTypePanel extends FramedPanel {
|
||||||
+ (event.getValue() == null ? "nothing"
|
+ (event.getValue() == null ? "nothing"
|
||||||
: labelProvider.getLabel(event
|
: labelProvider.getLabel(event
|
||||||
.getValue()) + "!"));
|
.getValue()) + "!"));
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
combo.addSelectionHandler(new SelectionHandler<T>() {
|
combo.addSelectionHandler(new SelectionHandler<T>() {
|
||||||
|
@ -140,37 +150,34 @@ public class ChangeColumnTypePanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void loadData(ListLoadConfig loadConfig,
|
protected void loadData(ListLoadConfig loadConfig,
|
||||||
final AsyncCallback<ListLoadResult<ColumnData>> callback) {
|
final AsyncCallback<ListLoadResult<ColumnData>> callback) {
|
||||||
TDGWTServiceAsync.INSTANCE.getColumns(trId, new AsyncCallback<ArrayList<ColumnData>>(){
|
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||||
|
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||||
|
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.error("load combo failure:"+caught.getLocalizedMessage());
|
Log.error("load combo failure:"
|
||||||
callback.onFailure(caught);
|
+ caught.getLocalizedMessage());
|
||||||
}
|
callback.onFailure(caught);
|
||||||
|
|
||||||
public void onSuccess(ArrayList<ColumnData> result) {
|
|
||||||
Log.trace("loaded " + result.size() + " ColumnData");
|
|
||||||
if(columnName!=null){
|
|
||||||
for(ColumnData cd: result){
|
|
||||||
if(cd.getName().compareTo(columnName)==0){
|
|
||||||
combo.setValue(cd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
callback.onSuccess(new ListLoadResultBean<ColumnData>(
|
public void onSuccess(ArrayList<ColumnData> result) {
|
||||||
result));
|
Log.trace("loaded " + result.size() + " ColumnData");
|
||||||
|
if (columnName != null) {
|
||||||
}
|
for (ColumnData cd : result) {
|
||||||
|
if (cd.getName().compareTo(columnName) == 0) {
|
||||||
});
|
comboColumn.setValue(cd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback.onSuccess(new ListLoadResultBean<ColumnData>(
|
||||||
|
result));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package org.gcube.portlets.user.td.columnwidget.client;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
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.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.columnwidget.client;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
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.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.columnwidget.client;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ColumnDataProperties;
|
||||||
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.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.gcube.portlets.user.td.columnwidget.client;
|
package org.gcube.portlets.user.td.columnwidget.client.properties;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.gcube.portlets.user.td.columnwidget.client.properties;
|
||||||
|
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnTypeCode;
|
||||||
|
|
||||||
|
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<ColumnTypeCode> {
|
||||||
|
|
||||||
|
@Path("id")
|
||||||
|
ModelKeyProvider<String> id();
|
||||||
|
|
||||||
|
LabelProvider<String> label();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue