Updated for curation on validations
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@95872 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
29255d0db2
commit
915eca5344
|
@ -3450,3 +3450,99 @@ 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: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 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
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 0 cached/archived units. Used 0 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 seconds)
|
||||||
|
60% complete (ETR: 3 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.13 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: 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.71 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
|
||||||
|
|
|
@ -5,9 +5,11 @@ import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
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.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.RefColumn;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
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.client.type.SessionExpiredType;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
@ -28,6 +30,7 @@ public class ReplaceBatchDialog extends Window {
|
||||||
protected String HEIGHT = "530px";
|
protected String HEIGHT = "530px";
|
||||||
protected TRId trId;
|
protected TRId trId;
|
||||||
protected String columnName = null;
|
protected String columnName = null;
|
||||||
|
protected RequestProperties requestProperties;
|
||||||
protected EventBus eventBus;
|
protected EventBus eventBus;
|
||||||
|
|
||||||
public ReplaceBatchDialog(TRId trId, String columnName, EventBus eventBus) {
|
public ReplaceBatchDialog(TRId trId, String columnName, EventBus eventBus) {
|
||||||
|
@ -40,6 +43,19 @@ public class ReplaceBatchDialog extends Window {
|
||||||
add(batchRepalcePanel);
|
add(batchRepalcePanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ReplaceBatchDialog(TRId trId,
|
||||||
|
RequestProperties requestProperties, EventBus eventBus) {
|
||||||
|
this.trId = trId;
|
||||||
|
this.requestProperties=requestProperties;
|
||||||
|
this.eventBus = eventBus;
|
||||||
|
initWindow();
|
||||||
|
ReplaceBatchPanel batchRepalcePanel = new ReplaceBatchPanel(this, trId,
|
||||||
|
requestProperties, eventBus);
|
||||||
|
add(batchRepalcePanel);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void initWindow() {
|
protected void initWindow() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
|
|
|
@ -14,9 +14,11 @@ import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeE
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeStore;
|
import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeStore;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
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.client.rpc.TDGWTServiceAsync;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
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.gwtservice.shared.tr.DimensionRow;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
||||||
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.RefColumn;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.Occurrences;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.Occurrences;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.OccurrencesForReplaceBatchColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.OccurrencesForReplaceBatchColumnSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
||||||
|
@ -25,6 +27,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ShowOccurrencesType
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
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.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
@ -94,6 +97,11 @@ public class ReplaceBatchPanel extends FramedPanel implements
|
||||||
protected TextField label = null;
|
protected TextField label = null;
|
||||||
protected TRId trId;
|
protected TRId trId;
|
||||||
protected String columnName;
|
protected String columnName;
|
||||||
|
|
||||||
|
protected RefColumn refColumn;
|
||||||
|
protected String columnId;
|
||||||
|
protected RequestProperties requestProperties;
|
||||||
|
|
||||||
protected ColumnData column;
|
protected ColumnData column;
|
||||||
protected boolean hasValidationColumns;
|
protected boolean hasValidationColumns;
|
||||||
protected ShowOccurrencesType showOccurencesType;
|
protected ShowOccurrencesType showOccurencesType;
|
||||||
|
@ -124,6 +132,24 @@ public class ReplaceBatchPanel extends FramedPanel implements
|
||||||
|
|
||||||
private boolean simpleReplace;
|
private boolean simpleReplace;
|
||||||
|
|
||||||
|
public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId,
|
||||||
|
RequestProperties requestProperties, EventBus eventBus){
|
||||||
|
this.parent = parent;
|
||||||
|
this.trId = trId;
|
||||||
|
this.requestProperties=requestProperties;
|
||||||
|
this.eventBus = eventBus;
|
||||||
|
columnId=(String)requestProperties.getMap().get(Constants.REQUEST_PROPERTIES_COLUMNID);
|
||||||
|
refColumn=(RefColumn)requestProperties.getMap().get(Constants.REQUEST_PROPERTIES_REFCOLUMN);
|
||||||
|
|
||||||
|
connection = null;
|
||||||
|
hasValidationColumns = false;
|
||||||
|
Log.debug("Create BatchReplacePanel(): [" + trId.toString()
|
||||||
|
+ " , columnName:" + columnName + "]");
|
||||||
|
init();
|
||||||
|
retrieveConnection();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId,
|
public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId,
|
||||||
String columnName, EventBus eventBus) {
|
String columnName, EventBus eventBus) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
@ -392,6 +418,16 @@ public class ReplaceBatchPanel extends FramedPanel implements
|
||||||
if (!column.isViewColumn()) {
|
if (!column.isViewColumn()) {
|
||||||
connectionField.setVisible(false);
|
connectionField.setVisible(false);
|
||||||
btnDisconnect.setVisible(false);
|
btnDisconnect.setVisible(false);
|
||||||
|
} else {
|
||||||
|
if(connection!=null){
|
||||||
|
Log.debug("Selected connection: " + connection);
|
||||||
|
connectionField.setValue(connection.getLabel());
|
||||||
|
connectionField.setVisible(true);
|
||||||
|
btnDisconnect.setVisible(true);
|
||||||
|
btnConnect.setVisible(false);
|
||||||
|
btnConnect.enable();
|
||||||
|
toolBarHead.forceLayout();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,6 +456,34 @@ public class ReplaceBatchPanel extends FramedPanel implements
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void retrieveColumnByColumnId() {
|
||||||
|
TDGWTServiceAsync.INSTANCE.getColumn(columnId,trId,
|
||||||
|
new AsyncCallback<ColumnData>() {
|
||||||
|
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
|
Log.error("load column failure:"
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3.alert("Error retrieving column",
|
||||||
|
"Error retrieving column");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSuccess(ColumnData result) {
|
||||||
|
Log.debug("Column: " + result);
|
||||||
|
column = result;
|
||||||
|
columnName=result.getName();
|
||||||
|
retriveValidationColumn();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected void retriveValidationColumn() {
|
protected void retriveValidationColumn() {
|
||||||
TDGWTServiceAsync.INSTANCE.getValidationColumns(trId, columnName,
|
TDGWTServiceAsync.INSTANCE.getValidationColumns(trId, columnName,
|
||||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||||
|
@ -743,4 +807,30 @@ public class ReplaceBatchPanel extends FramedPanel implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void retrieveConnection(){
|
||||||
|
TDGWTServiceAsync.INSTANCE.getConnection(refColumn,
|
||||||
|
new AsyncCallback<ColumnData>() {
|
||||||
|
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
eventBus.fireEvent(new SessionExpiredEvent(
|
||||||
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
|
} else {
|
||||||
|
Log.error("load column failure:"
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3.alert("Error retrieving connection",
|
||||||
|
"Error retrieving connection column");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSuccess(ColumnData result) {
|
||||||
|
Log.debug("Column: " + result);
|
||||||
|
connection = result;
|
||||||
|
retrieveColumnByColumnId();
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue