2014-03-17 18:59:08 +01:00
|
|
|
package org.gcube.portlets.user.td.columnwidget.client.batch;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
2014-03-19 12:52:51 +01:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.custom.ActionButtonCell;
|
2014-04-11 16:12:21 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.ConnectCodelistDialog;
|
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.ConnectCodelistListener;
|
2014-04-03 18:36:55 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSelectionDialog;
|
2014-04-02 17:18:19 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSelectionListener;
|
2014-04-04 20:26:43 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.properties.ShowOccurrencesTypeProperties;
|
2014-03-19 12:52:51 +01:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
2014-04-04 20:26:43 +02:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeElement;
|
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.store.ShowOccurrencesTypeStore;
|
2014-03-18 18:22:39 +01:00
|
|
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
|
|
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
2014-05-20 18:54:30 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.Constants;
|
2014-05-16 12:24:29 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
2014-07-09 18:43:42 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.task.InvocationS;
|
2014-03-18 18:22:39 +01:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
2014-07-30 12:59:26 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnViewData;
|
2014-07-02 17:28:09 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ConditionCode;
|
2014-04-03 18:36:55 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
2014-05-20 18:54:30 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.RefColumn;
|
2014-04-04 12:33:26 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.Occurrences;
|
2014-04-08 10:45:11 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.OccurrencesForReplaceBatchColumnSession;
|
2014-04-04 10:21:28 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceBatchColumnSession;
|
2014-04-03 18:36:55 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ReplaceEntry;
|
2014-04-08 10:45:11 +02:00
|
|
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.batch.ShowOccurrencesType;
|
2014-05-16 12:24:29 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
2014-04-03 18:36:55 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
|
2014-05-20 18:54:30 +02:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.RequestProperties;
|
2014-03-17 18:59:08 +01:00
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
|
|
|
|
|
|
|
import com.allen_sauer.gwt.log.client.Log;
|
2014-04-02 17:51:15 +02:00
|
|
|
import com.google.gwt.cell.client.AbstractCell;
|
2014-03-18 18:22:39 +01:00
|
|
|
import com.google.gwt.cell.client.Cell.Context;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.google.gwt.core.client.GWT;
|
|
|
|
import com.google.gwt.core.client.Scheduler;
|
|
|
|
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
2014-03-19 12:52:51 +01:00
|
|
|
import com.google.gwt.dom.client.Style.Unit;
|
2014-04-04 20:26:43 +02:00
|
|
|
import com.google.gwt.event.logical.shared.SelectionEvent;
|
|
|
|
import com.google.gwt.event.logical.shared.SelectionHandler;
|
2014-03-19 12:52:51 +01:00
|
|
|
import com.google.gwt.safecss.shared.SafeStylesBuilder;
|
2014-04-02 17:51:15 +02:00
|
|
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
2014-03-19 15:22:35 +01:00
|
|
|
import com.google.gwt.user.client.ui.HTML;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.google.web.bindery.event.shared.EventBus;
|
2014-03-19 16:48:15 +01:00
|
|
|
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
2014-04-04 20:26:43 +02:00
|
|
|
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.core.client.IdentityValueProvider;
|
|
|
|
import com.sencha.gxt.core.client.Style.SelectionMode;
|
2014-03-19 15:22:35 +01:00
|
|
|
import com.sencha.gxt.core.client.resources.ThemeStyles;
|
2014-03-18 18:22:39 +01:00
|
|
|
import com.sencha.gxt.core.client.util.Format;
|
|
|
|
import com.sencha.gxt.core.client.util.Margins;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.data.client.loader.RpcProxy;
|
2014-04-04 20:26:43 +02:00
|
|
|
import com.sencha.gxt.data.shared.LabelProvider;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.data.shared.ListStore;
|
2014-03-19 15:22:35 +01:00
|
|
|
import com.sencha.gxt.data.shared.event.StoreDataChangeEvent;
|
|
|
|
import com.sencha.gxt.data.shared.event.StoreDataChangeEvent.StoreDataChangeHandler;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.data.shared.loader.ListLoadConfig;
|
|
|
|
import com.sencha.gxt.data.shared.loader.ListLoadResult;
|
2014-03-18 18:22:39 +01:00
|
|
|
import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.data.shared.loader.ListLoader;
|
|
|
|
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
|
|
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
2014-03-19 16:48:15 +01:00
|
|
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
|
|
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
2014-03-18 18:22:39 +01:00
|
|
|
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.SelectEvent;
|
|
|
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
2014-04-04 20:26:43 +02:00
|
|
|
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
2014-03-17 18:59:08 +01:00
|
|
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.Grid;
|
|
|
|
import com.sencha.gxt.widget.core.client.grid.RowNumberer;
|
2014-04-04 20:26:43 +02:00
|
|
|
import com.sencha.gxt.widget.core.client.info.Info;
|
|
|
|
import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;
|
2014-03-19 15:22:35 +01:00
|
|
|
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
2014-03-17 18:59:08 +01:00
|
|
|
|
2014-03-17 19:03:29 +01:00
|
|
|
/**
|
|
|
|
*
|
2014-03-18 18:22:39 +01:00
|
|
|
* @author "Giancarlo Panichi" <a
|
|
|
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
|
|
|
*
|
2014-03-17 19:03:29 +01:00
|
|
|
*/
|
2014-04-04 10:21:28 +02:00
|
|
|
public class ReplaceBatchPanel extends FramedPanel implements
|
2014-04-11 17:45:20 +02:00
|
|
|
SingleValueReplaceListener, DimensionRowSelectionListener,
|
|
|
|
ConnectCodelistListener {
|
2014-03-19 15:22:35 +01:00
|
|
|
protected String WIDTH = "560px";
|
2014-03-17 18:59:08 +01:00
|
|
|
protected String HEIGHT = "520px";
|
|
|
|
protected EventBus eventBus;
|
|
|
|
protected TextField label = null;
|
|
|
|
protected TRId trId;
|
|
|
|
protected String columnName;
|
2014-05-20 18:54:30 +02:00
|
|
|
|
|
|
|
protected RefColumn refColumn;
|
|
|
|
protected String columnId;
|
2014-07-16 16:50:55 +02:00
|
|
|
protected ConditionCode conditionCode; // For Curation
|
|
|
|
protected String validationColumnColumnId; // For Curation
|
2014-05-20 18:54:30 +02:00
|
|
|
protected RequestProperties requestProperties;
|
2014-05-21 12:48:16 +02:00
|
|
|
protected boolean curation;
|
2014-03-18 18:22:39 +01:00
|
|
|
protected ColumnData column;
|
2014-04-04 16:04:09 +02:00
|
|
|
protected boolean hasValidationColumns;
|
2014-04-08 10:45:11 +02:00
|
|
|
protected ShowOccurrencesType showOccurencesType;
|
2014-04-11 18:23:20 +02:00
|
|
|
protected ColumnData connection;
|
2014-04-04 16:04:09 +02:00
|
|
|
|
2014-04-04 10:21:28 +02:00
|
|
|
protected ReplaceBatchDialog parent;
|
2014-04-11 18:23:20 +02:00
|
|
|
|
2014-04-03 18:36:55 +02:00
|
|
|
private ReplaceEntry currentReplaceEntry;
|
|
|
|
private int currentRowIndex;
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-19 12:52:51 +01:00
|
|
|
protected static final String DON_T_REPLACE = "Don't replace";
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-04-04 19:03:49 +02:00
|
|
|
private TextButton btnSave;
|
2014-03-19 16:48:15 +01:00
|
|
|
private TextButton btnClose;
|
2014-04-11 18:23:20 +02:00
|
|
|
|
2014-04-11 17:45:20 +02:00
|
|
|
private ToolBar toolBarHead;
|
2014-04-11 18:23:20 +02:00
|
|
|
|
2014-04-11 17:45:20 +02:00
|
|
|
private ComboBox<ShowOccurrencesTypeElement> comboShowOccurrencesType = null;
|
2014-07-30 12:59:26 +02:00
|
|
|
private ListStore<ShowOccurrencesTypeElement> storeShowOccurrencesType;
|
2014-04-11 16:12:21 +02:00
|
|
|
|
2014-04-11 17:45:20 +02:00
|
|
|
private TextButton btnConnect;
|
2014-05-27 12:30:42 +02:00
|
|
|
private TextButton btnDisconnect;
|
2014-04-11 17:45:20 +02:00
|
|
|
private TextField connectionField;
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
protected ListLoader<ListLoadConfig, ListLoadResult<ReplaceEntry>> loader;
|
|
|
|
protected Grid<ReplaceEntry> grid;
|
|
|
|
protected ListStore<ReplaceEntry> store;
|
2014-03-19 15:22:35 +01:00
|
|
|
protected HTML info;
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
private boolean simpleReplace;
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-05-20 18:54:30 +02:00
|
|
|
public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId,
|
2014-05-21 12:48:16 +02:00
|
|
|
RequestProperties requestProperties, EventBus eventBus) {
|
|
|
|
this.curation = true;
|
2014-05-20 18:54:30 +02:00
|
|
|
this.parent = parent;
|
|
|
|
this.trId = trId;
|
2014-05-21 12:48:16 +02:00
|
|
|
this.requestProperties = requestProperties;
|
2014-05-20 18:54:30 +02:00
|
|
|
this.eventBus = eventBus;
|
2014-07-16 16:50:55 +02:00
|
|
|
|
|
|
|
InvocationS invocationS = (InvocationS) requestProperties.getMap().get(
|
2014-07-09 18:43:42 +02:00
|
|
|
Constants.REQUEST_PROPERTIES_INVOCATIONS);
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-07-09 18:43:42 +02:00
|
|
|
columnId = invocationS.getColumnId();
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-07-09 18:43:42 +02:00
|
|
|
refColumn = invocationS.getRefColumn();
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-07-02 17:28:09 +02:00
|
|
|
conditionCode = (ConditionCode) requestProperties.getMap().get(
|
|
|
|
Constants.REQUEST_PROPERTIES_CONDITIONCODE);
|
|
|
|
validationColumnColumnId = (String) requestProperties.getMap().get(
|
|
|
|
Constants.REQUEST_PROPERTIES_VALIDATIONCOLUMNCOLUMNID);
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-05-20 18:54:30 +02:00
|
|
|
connection = null;
|
|
|
|
hasValidationColumns = false;
|
|
|
|
Log.debug("Create BatchReplacePanel(): [" + trId.toString()
|
2014-05-21 12:48:16 +02:00
|
|
|
+ " , RequestProperties:" + requestProperties + "]");
|
2014-05-20 18:54:30 +02:00
|
|
|
init();
|
|
|
|
retrieveConnection();
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-05-20 18:54:30 +02:00
|
|
|
}
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-04-04 10:21:28 +02:00
|
|
|
public ReplaceBatchPanel(ReplaceBatchDialog parent, TRId trId,
|
2014-04-02 17:18:19 +02:00
|
|
|
String columnName, EventBus eventBus) {
|
2014-05-21 12:48:16 +02:00
|
|
|
this.curation = false;
|
2014-04-02 17:18:19 +02:00
|
|
|
this.parent = parent;
|
2014-03-17 18:59:08 +01:00
|
|
|
this.trId = trId;
|
|
|
|
this.columnName = columnName;
|
|
|
|
this.eventBus = eventBus;
|
2014-07-16 16:50:55 +02:00
|
|
|
this.conditionCode = null;
|
|
|
|
this.validationColumnColumnId = null;
|
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
connection = null;
|
2014-04-04 20:26:43 +02:00
|
|
|
hasValidationColumns = false;
|
2014-03-18 18:22:39 +01:00
|
|
|
Log.debug("Create BatchReplacePanel(): [" + trId.toString()
|
|
|
|
+ " , columnName:" + columnName + "]");
|
2014-04-03 18:36:55 +02:00
|
|
|
init();
|
2014-03-18 18:22:39 +01:00
|
|
|
retrieveColumn();
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
}
|
|
|
|
|
2014-04-03 18:36:55 +02:00
|
|
|
protected void init() {
|
|
|
|
setWidth(WIDTH);
|
|
|
|
setHeight(HEIGHT);
|
|
|
|
setHeaderVisible(false);
|
|
|
|
setBodyBorder(false);
|
|
|
|
}
|
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
protected void create() {
|
2014-04-08 10:45:11 +02:00
|
|
|
showOccurencesType = ShowOccurrencesType.ONLYERRORS;
|
|
|
|
|
2014-04-11 17:45:20 +02:00
|
|
|
toolBarHead = new ToolBar();
|
2014-04-04 20:26:43 +02:00
|
|
|
toolBarHead.add(new LabelToolItem("Show: "));
|
2014-04-11 18:23:20 +02:00
|
|
|
|
2014-04-04 20:26:43 +02:00
|
|
|
// Create Combo Show
|
|
|
|
ShowOccurrencesTypeProperties propsShowOccurrencesType = GWT
|
|
|
|
.create(ShowOccurrencesTypeProperties.class);
|
2014-07-30 12:59:26 +02:00
|
|
|
storeShowOccurrencesType = new ListStore<ShowOccurrencesTypeElement>(
|
2014-04-04 20:26:43 +02:00
|
|
|
propsShowOccurrencesType.id());
|
2014-07-30 12:59:26 +02:00
|
|
|
|
|
|
|
|
2014-04-04 20:26:43 +02:00
|
|
|
comboShowOccurrencesType = new ComboBox<ShowOccurrencesTypeElement>(
|
2014-04-08 10:45:11 +02:00
|
|
|
storeShowOccurrencesType, propsShowOccurrencesType.label());
|
2014-04-04 20:26:43 +02:00
|
|
|
Log.trace("ComboMeasureType created");
|
|
|
|
|
2014-04-08 10:45:11 +02:00
|
|
|
addHandlersForShowOccurrencesType(propsShowOccurrencesType.label());
|
2014-04-04 20:26:43 +02:00
|
|
|
|
|
|
|
comboShowOccurrencesType.setEmptyText("Select a show type...");
|
|
|
|
comboShowOccurrencesType.setWidth(100);
|
|
|
|
comboShowOccurrencesType.setTypeAhead(true);
|
|
|
|
comboShowOccurrencesType.setEditable(false);
|
|
|
|
comboShowOccurrencesType.setTriggerAction(TriggerAction.ALL);
|
2014-04-08 10:45:11 +02:00
|
|
|
comboShowOccurrencesType
|
|
|
|
.setValue(ShowOccurrencesTypeStore.onlyErrorsElement);
|
|
|
|
|
2014-04-04 20:26:43 +02:00
|
|
|
toolBarHead.add(comboShowOccurrencesType);
|
2014-04-08 10:45:11 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
if (!column.isViewColumn()) {
|
|
|
|
// Connect Codelist
|
|
|
|
btnConnect = new TextButton();
|
|
|
|
btnConnect.setIcon(ResourceBundle.INSTANCE.codelistLink24());
|
|
|
|
btnConnect.setIconAlign(IconAlign.TOP);
|
|
|
|
btnConnect.setTitle("Connect");
|
|
|
|
btnConnect.addSelectHandler(new SelectHandler() {
|
2014-04-11 16:12:21 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
public void onSelect(SelectEvent event) {
|
|
|
|
Log.debug("Pressed Connect");
|
|
|
|
btnConnect.disable();
|
|
|
|
connectCodelist();
|
2014-04-11 16:12:21 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
}
|
2014-04-11 16:12:21 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
});
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
toolBarHead.add(btnConnect);
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
// Disconnect Codelist
|
|
|
|
btnDisconnect = new TextButton();
|
|
|
|
btnDisconnect
|
|
|
|
.setIcon(ResourceBundle.INSTANCE.codelistLinkBreak24());
|
|
|
|
btnDisconnect.setIconAlign(IconAlign.TOP);
|
|
|
|
btnDisconnect.setTitle("Disconnect");
|
|
|
|
btnDisconnect.addSelectHandler(new SelectHandler() {
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
public void onSelect(SelectEvent event) {
|
|
|
|
Log.debug("Pressed Disconnect");
|
|
|
|
btnDisconnect.disable();
|
|
|
|
disconnectCodelist();
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
toolBarHead.add(btnDisconnect);
|
|
|
|
|
|
|
|
connectionField = new TextField();
|
|
|
|
toolBarHead.add(connectionField);
|
|
|
|
|
2014-07-30 12:59:26 +02:00
|
|
|
} else {
|
|
|
|
connectionField = new TextField();
|
|
|
|
toolBarHead.add(connectionField);
|
2014-04-11 18:23:20 +02:00
|
|
|
}
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-04 20:26:43 +02:00
|
|
|
// Create Grid
|
2014-03-18 18:22:39 +01:00
|
|
|
IdentityValueProvider<ReplaceEntry> identity = new IdentityValueProvider<ReplaceEntry>();
|
|
|
|
CheckBoxSelectionModel<ReplaceEntry> sm = new CheckBoxSelectionModel<ReplaceEntry>(
|
2014-03-17 18:59:08 +01:00
|
|
|
identity);
|
|
|
|
|
2014-04-02 17:18:19 +02:00
|
|
|
RowNumberer<ReplaceEntry> number = new RowNumberer<ReplaceEntry>(
|
|
|
|
identity);
|
|
|
|
// number.setFixed(false);
|
|
|
|
// number.setResizable(false);
|
2014-03-19 12:52:51 +01:00
|
|
|
number.setWidth(50);
|
|
|
|
number.setColumnClassSuffix("");
|
|
|
|
number.setHeader("N.");
|
2014-04-02 17:18:19 +02:00
|
|
|
SafeStylesBuilder styleBuilder = new SafeStylesBuilder();
|
2014-03-19 12:52:51 +01:00
|
|
|
styleBuilder.width(50, Unit.PX);
|
|
|
|
number.setColumnStyle(styleBuilder.toSafeStyles());
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
ReplaceEntryProperties props = GWT.create(ReplaceEntryProperties.class);
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
ColumnConfig<ReplaceEntry, String> valueCol = new ColumnConfig<ReplaceEntry, String>(
|
2014-03-19 12:52:51 +01:00
|
|
|
props.value(), 130, "Values");
|
2014-03-18 18:22:39 +01:00
|
|
|
ColumnConfig<ReplaceEntry, Integer> numberCol = new ColumnConfig<ReplaceEntry, Integer>(
|
2014-04-04 12:33:26 +02:00
|
|
|
props.number(), 100, "Occurrences");
|
2014-03-18 18:22:39 +01:00
|
|
|
ColumnConfig<ReplaceEntry, String> replacementValueCol = new ColumnConfig<ReplaceEntry, String>(
|
2014-04-02 17:18:19 +02:00
|
|
|
props.replacementValue(), 130, "Replacement");
|
|
|
|
|
|
|
|
replacementValueCol.setCell(new AbstractCell<String>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void render(Context context, String value, SafeHtmlBuilder sb) {
|
|
|
|
if (value == null) {
|
|
|
|
String style = "style='color: black;font-weight:bold'";
|
2014-04-03 18:36:55 +02:00
|
|
|
sb.appendHtmlConstant("<span " + style + ">"
|
|
|
|
+ DON_T_REPLACE + "</span>");
|
2014-04-02 17:18:19 +02:00
|
|
|
} else {
|
|
|
|
String style = "style='color: green;font-weight:normal'";
|
2014-04-03 18:36:55 +02:00
|
|
|
sb.appendHtmlConstant("<span " + style + ">" + value
|
2014-04-02 17:18:19 +02:00
|
|
|
+ "</span>");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
ColumnConfig<ReplaceEntry, String> changeColumn = new ColumnConfig<ReplaceEntry, String>(
|
2014-04-02 17:18:19 +02:00
|
|
|
props.value(), 24);
|
2014-03-17 18:59:08 +01:00
|
|
|
|
2014-03-19 12:52:51 +01:00
|
|
|
ActionButtonCell button = new ActionButtonCell();
|
|
|
|
button.setIcon(ResourceBundle.INSTANCE.magnifier());
|
|
|
|
button.setTitle("Change");
|
2014-03-18 18:22:39 +01:00
|
|
|
button.addSelectHandler(new SelectHandler() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onSelect(SelectEvent event) {
|
2014-04-03 18:36:55 +02:00
|
|
|
Log.debug("Button Change Pressed");
|
2014-03-18 18:22:39 +01:00
|
|
|
Context c = event.getContext();
|
2014-04-02 17:18:19 +02:00
|
|
|
int rowIndex = c.getIndex();
|
|
|
|
startReplaceEntry(rowIndex);
|
2014-03-18 18:22:39 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
changeColumn.setCell(button);
|
|
|
|
|
|
|
|
List<ColumnConfig<ReplaceEntry, ?>> l = new ArrayList<ColumnConfig<ReplaceEntry, ?>>();
|
2014-03-17 18:59:08 +01:00
|
|
|
l.add(number);
|
|
|
|
l.add(valueCol);
|
|
|
|
l.add(numberCol);
|
2014-03-18 18:22:39 +01:00
|
|
|
l.add(replacementValueCol);
|
|
|
|
l.add(changeColumn);
|
|
|
|
ColumnModel<ReplaceEntry> cm = new ColumnModel<ReplaceEntry>(l);
|
2014-03-17 18:59:08 +01:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
store = new ListStore<ReplaceEntry>(props.id());
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-19 15:22:35 +01:00
|
|
|
store.addStoreDataChangeHandler(new StoreDataChangeHandler<ReplaceEntry>() {
|
2014-03-17 18:59:08 +01:00
|
|
|
|
2014-03-19 15:22:35 +01:00
|
|
|
@Override
|
|
|
|
public void onDataChange(StoreDataChangeEvent<ReplaceEntry> event) {
|
|
|
|
updateInfo();
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-19 15:22:35 +01:00
|
|
|
}
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-19 15:22:35 +01:00
|
|
|
});
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
RpcProxy<ListLoadConfig, ListLoadResult<ReplaceEntry>> proxy = new RpcProxy<ListLoadConfig, ListLoadResult<ReplaceEntry>>() {
|
2014-03-17 18:59:08 +01:00
|
|
|
|
|
|
|
public void load(ListLoadConfig loadConfig,
|
2014-03-18 18:22:39 +01:00
|
|
|
final AsyncCallback<ListLoadResult<ReplaceEntry>> callback) {
|
2014-03-17 18:59:08 +01:00
|
|
|
loadData(loadConfig, callback);
|
|
|
|
}
|
|
|
|
};
|
2014-03-18 18:22:39 +01:00
|
|
|
loader = new ListLoader<ListLoadConfig, ListLoadResult<ReplaceEntry>>(
|
2014-03-17 18:59:08 +01:00
|
|
|
proxy);
|
|
|
|
|
|
|
|
loader.setRemoteSort(false);
|
2014-03-18 18:22:39 +01:00
|
|
|
loader.addLoadHandler(new LoadResultListStoreBinding<ListLoadConfig, ReplaceEntry, ListLoadResult<ReplaceEntry>>(
|
2014-03-17 18:59:08 +01:00
|
|
|
store) {
|
|
|
|
});
|
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
grid = new Grid<ReplaceEntry>(store, cm) {
|
2014-03-17 18:59:08 +01:00
|
|
|
@Override
|
|
|
|
protected void onAfterFirstAttach() {
|
|
|
|
super.onAfterFirstAttach();
|
|
|
|
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
|
|
|
|
|
|
|
public void execute() {
|
|
|
|
loader.load();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
sm.setSelectionMode(SelectionMode.MULTI);
|
|
|
|
grid.setLoader(loader);
|
|
|
|
grid.setSelectionModel(sm);
|
2014-03-18 18:22:39 +01:00
|
|
|
number.initPlugin(grid);
|
2014-04-11 18:23:20 +02:00
|
|
|
grid.setHeight("376px");
|
2014-03-17 18:59:08 +01:00
|
|
|
grid.getView().setStripeRows(true);
|
|
|
|
grid.getView().setColumnLines(true);
|
2014-03-18 18:22:39 +01:00
|
|
|
grid.getView().setAutoFill(true);
|
2014-03-17 18:59:08 +01:00
|
|
|
grid.setBorders(false);
|
|
|
|
grid.setLoadMask(true);
|
|
|
|
grid.setColumnReordering(true);
|
2014-03-19 12:52:51 +01:00
|
|
|
grid.setColumnResize(true);
|
|
|
|
grid.getView().setAutoExpandColumn(valueCol);
|
2014-04-02 17:18:19 +02:00
|
|
|
|
|
|
|
info = new HTML("No info");
|
|
|
|
|
2014-03-19 15:22:35 +01:00
|
|
|
ToolBar toolBar = new ToolBar();
|
|
|
|
toolBar.add(info);
|
|
|
|
toolBar.addStyleName(ThemeStyles.getStyle().borderTop());
|
|
|
|
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-04-04 19:03:49 +02:00
|
|
|
btnSave = new TextButton("Save");
|
|
|
|
btnSave.setIcon(ResourceBundle.INSTANCE.save());
|
|
|
|
btnSave.setIconAlign(IconAlign.RIGHT);
|
|
|
|
btnSave.setTitle("Save");
|
|
|
|
btnSave.addSelectHandler(new SelectHandler() {
|
2014-03-19 16:48:15 +01:00
|
|
|
|
|
|
|
public void onSelect(SelectEvent event) {
|
2014-04-04 19:03:49 +02:00
|
|
|
Log.debug("Pressed Save");
|
|
|
|
btnSave.disable();
|
2014-03-19 16:48:15 +01:00
|
|
|
save();
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
btnClose = new TextButton("Close");
|
|
|
|
btnClose.setIcon(ResourceBundle.INSTANCE.close());
|
|
|
|
btnClose.setIconAlign(IconAlign.RIGHT);
|
2014-04-09 15:30:46 +02:00
|
|
|
btnClose.setTitle("Close");
|
2014-03-19 16:48:15 +01:00
|
|
|
btnClose.addSelectHandler(new SelectHandler() {
|
|
|
|
|
|
|
|
public void onSelect(SelectEvent event) {
|
|
|
|
Log.debug("Pressed Close");
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
});
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-03-19 16:48:15 +01:00
|
|
|
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
|
|
|
|
flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
|
|
|
flowButton.setPack(BoxLayoutPack.CENTER);
|
2014-04-02 17:18:19 +02:00
|
|
|
|
2014-04-04 19:03:49 +02:00
|
|
|
flowButton.add(btnSave, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
2014-04-02 17:18:19 +02:00
|
|
|
flowButton.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
2014-04-08 10:45:11 +02:00
|
|
|
v.add(toolBarHead, new VerticalLayoutData(1, -1, new Margins(0)));
|
2014-03-18 18:22:39 +01:00
|
|
|
v.add(grid, new VerticalLayoutData(-1, -1, new Margins(0)));
|
2014-04-02 17:18:19 +02:00
|
|
|
v.add(toolBar, new VerticalLayoutData(1, 25, new Margins(0)));
|
|
|
|
v.add(flowButton, new VerticalLayoutData(-1, 36,
|
|
|
|
new Margins(5, 2, 5, 2)));
|
2014-03-18 18:22:39 +01:00
|
|
|
add(v);
|
2014-03-17 18:59:08 +01:00
|
|
|
|
2014-05-21 12:48:16 +02:00
|
|
|
if (curation) {
|
2014-07-30 12:59:26 +02:00
|
|
|
storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore.getShowOccurrencesType());
|
2014-05-21 12:48:16 +02:00
|
|
|
if (connection != null) {
|
2014-05-20 18:54:30 +02:00
|
|
|
Log.debug("Selected connection: " + connection);
|
|
|
|
connectionField.setValue(connection.getLabel());
|
|
|
|
connectionField.setVisible(true);
|
|
|
|
btnDisconnect.setVisible(true);
|
|
|
|
btnConnect.setVisible(false);
|
|
|
|
btnConnect.enable();
|
2014-07-30 12:59:26 +02:00
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
}
|
|
|
|
toolBarHead.forceLayout();
|
|
|
|
} else {
|
|
|
|
if (column.isViewColumn()) {
|
|
|
|
Log.debug("Is View Column");
|
|
|
|
storeShowOccurrencesType
|
|
|
|
.add(ShowOccurrencesTypeStore.onlyErrorsElement);
|
|
|
|
ColumnViewData cViewData = column.getColumnViewData();
|
|
|
|
RefColumn refCol = new RefColumn(String.valueOf(cViewData
|
|
|
|
.getTargetTableId()),
|
|
|
|
cViewData.getTargetTableColumnId());
|
|
|
|
retrieveConnectionForViewColumn(refCol);
|
|
|
|
} else {
|
|
|
|
storeShowOccurrencesType.addAll(ShowOccurrencesTypeStore.getShowOccurrencesType());
|
|
|
|
Log.debug("Not Is View Column");
|
|
|
|
connectionField.setVisible(false);
|
|
|
|
btnDisconnect.setVisible(false);
|
2014-05-20 18:54:30 +02:00
|
|
|
toolBarHead.forceLayout();
|
|
|
|
}
|
2014-07-30 12:59:26 +02:00
|
|
|
|
2014-04-11 18:23:20 +02:00
|
|
|
}
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
}
|
2014-04-02 17:18:19 +02:00
|
|
|
|
|
|
|
protected void retrieveColumn() {
|
|
|
|
TDGWTServiceAsync.INSTANCE.getColumn(trId, columnName,
|
2014-03-18 18:22:39 +01:00
|
|
|
new AsyncCallback<ColumnData>() {
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-05-16 12:24:29 +02:00
|
|
|
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");
|
|
|
|
}
|
2014-03-18 18:22:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(ColumnData result) {
|
2014-04-02 17:18:19 +02:00
|
|
|
Log.debug("Column: " + result);
|
|
|
|
column = result;
|
2014-04-04 16:04:09 +02:00
|
|
|
retriveValidationColumn();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-05-20 18:54:30 +02:00
|
|
|
protected void retrieveColumnByColumnId() {
|
2014-05-21 12:48:16 +02:00
|
|
|
Log.debug("Retrieve Column by ColumnId: columnId:" + columnId
|
|
|
|
+ ", trId:" + trId);
|
|
|
|
TDGWTServiceAsync.INSTANCE.getColumn(columnId, trId,
|
2014-05-20 18:54:30 +02:00
|
|
|
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;
|
2014-05-21 12:48:16 +02:00
|
|
|
columnName = result.getName();
|
2014-05-20 18:54:30 +02:00
|
|
|
retriveValidationColumn();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2014-04-04 16:04:09 +02:00
|
|
|
|
|
|
|
protected void retriveValidationColumn() {
|
|
|
|
TDGWTServiceAsync.INSTANCE.getValidationColumns(trId, columnName,
|
|
|
|
new AsyncCallback<ArrayList<ColumnData>>() {
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-05-16 12:24:29 +02:00
|
|
|
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");
|
|
|
|
}
|
2014-04-04 16:04:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public void onSuccess(ArrayList<ColumnData> result) {
|
|
|
|
Log.debug("Validation Columns: " + result.size());
|
|
|
|
ArrayList<String> validationColumnReferences = new ArrayList<String>();
|
|
|
|
if (result.size() > 0) {
|
2014-04-04 20:26:43 +02:00
|
|
|
hasValidationColumns = true;
|
2014-04-04 16:04:09 +02:00
|
|
|
for (ColumnData columnData : result) {
|
|
|
|
validationColumnReferences.add(columnData
|
|
|
|
.getColumnId());
|
|
|
|
}
|
|
|
|
column.setValidationColumnReferences(validationColumnReferences);
|
|
|
|
} else {
|
2014-04-04 20:26:43 +02:00
|
|
|
hasValidationColumns = false;
|
2014-04-04 16:04:09 +02:00
|
|
|
}
|
2014-03-18 18:22:39 +01:00
|
|
|
create();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2014-04-04 20:26:43 +02:00
|
|
|
protected void addHandlersForShowOccurrencesType(
|
|
|
|
final LabelProvider<ShowOccurrencesTypeElement> labelProvider) {
|
|
|
|
comboShowOccurrencesType
|
|
|
|
.addSelectionHandler(new SelectionHandler<ShowOccurrencesTypeElement>() {
|
|
|
|
public void onSelection(
|
|
|
|
SelectionEvent<ShowOccurrencesTypeElement> event) {
|
|
|
|
Info.display(
|
|
|
|
"Show Type Selected",
|
|
|
|
"You selected "
|
|
|
|
+ (event.getSelectedItem() == null ? "nothing"
|
|
|
|
: labelProvider.getLabel(event
|
|
|
|
.getSelectedItem())
|
|
|
|
+ "!"));
|
|
|
|
Log.debug("ComboShowOccurrencesType selected: "
|
|
|
|
+ event.getSelectedItem());
|
|
|
|
ShowOccurrencesTypeElement showType = event
|
|
|
|
.getSelectedItem();
|
2014-04-08 10:45:11 +02:00
|
|
|
updateShowType(showType);
|
2014-04-04 20:26:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
2014-04-08 10:45:11 +02:00
|
|
|
|
2014-07-30 12:59:26 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param showType
|
|
|
|
*/
|
2014-04-08 10:45:11 +02:00
|
|
|
protected void updateShowType(ShowOccurrencesTypeElement showType) {
|
|
|
|
showOccurencesType = showType.getType();
|
|
|
|
loader.load();
|
2014-04-04 20:26:43 +02:00
|
|
|
}
|
2014-04-08 10:45:11 +02:00
|
|
|
|
2014-07-30 12:59:26 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* @param loadConfig
|
|
|
|
* @param callback
|
|
|
|
*/
|
2014-03-17 18:59:08 +01:00
|
|
|
protected void loadData(ListLoadConfig loadConfig,
|
2014-03-18 18:22:39 +01:00
|
|
|
final AsyncCallback<ListLoadResult<ReplaceEntry>> callback) {
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-04-08 10:45:11 +02:00
|
|
|
OccurrencesForReplaceBatchColumnSession occurrencesSession = new OccurrencesForReplaceBatchColumnSession(
|
2014-07-16 16:50:55 +02:00
|
|
|
column, showOccurencesType, hasValidationColumns,
|
|
|
|
conditionCode, validationColumnColumnId);
|
2014-04-08 10:45:11 +02:00
|
|
|
|
|
|
|
TDGWTServiceAsync.INSTANCE.getOccurrencesForBatchReplace(
|
|
|
|
occurrencesSession,
|
2014-04-04 12:33:26 +02:00
|
|
|
new AsyncCallback<ArrayList<Occurrences>>() {
|
2014-03-17 18:59:08 +01:00
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
2014-05-16 12:24:29 +02:00
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
} else {
|
|
|
|
Log.error("load columns failure:"
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
UtilsGXT3.alert("Error retrieving columns",
|
|
|
|
"Error retrieving columns");
|
|
|
|
}
|
2014-03-17 18:59:08 +01:00
|
|
|
callback.onFailure(caught);
|
|
|
|
}
|
|
|
|
|
2014-04-04 12:33:26 +02:00
|
|
|
public void onSuccess(ArrayList<Occurrences> result) {
|
|
|
|
Log.trace("loaded " + result.size() + " Occurrences");
|
2014-04-04 16:04:09 +02:00
|
|
|
ListLoadResultBean<ReplaceEntry> loadedResult = new ListLoadResultBean<ReplaceEntry>(
|
2014-04-04 12:33:26 +02:00
|
|
|
getRecord(result));
|
2014-04-04 16:04:09 +02:00
|
|
|
Log.debug("created " + loadedResult.toString());
|
2014-04-04 12:33:26 +02:00
|
|
|
try {
|
2014-04-04 16:04:09 +02:00
|
|
|
callback.onSuccess(loadedResult);
|
|
|
|
} catch (Throwable e) {
|
2014-04-04 12:33:26 +02:00
|
|
|
Log.error("Too many different occurrences");
|
|
|
|
UtilsGXT3.alert("Attention",
|
|
|
|
"Too many different occurrences");
|
|
|
|
}
|
2014-03-17 18:59:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2014-03-18 18:22:39 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void updateInfo() {
|
|
|
|
Log.trace("updating the info bar");
|
|
|
|
int total = store.size();
|
|
|
|
int totalErrors = 0;
|
|
|
|
int assignedErrors = 0;
|
|
|
|
int assigned = 0;
|
|
|
|
for (ReplaceEntry record : store.getAll()) {
|
|
|
|
int errors = record.getNumber();
|
|
|
|
totalErrors += errors;
|
2014-04-02 17:18:19 +02:00
|
|
|
if (record.getReplacementValue() != null
|
|
|
|
&& record.getReplacementValue().compareTo(DON_T_REPLACE) != 0) {
|
2014-03-18 18:22:39 +01:00
|
|
|
assigned++;
|
|
|
|
assignedErrors += errors;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-02 17:18:19 +02:00
|
|
|
String text = Format.substitute(
|
2014-04-04 12:33:26 +02:00
|
|
|
"Assigned {0} ({1} occurrences) of {2} ({3} occurrences)",
|
2014-04-02 17:18:19 +02:00
|
|
|
String.valueOf(assigned), String.valueOf(assignedErrors),
|
|
|
|
String.valueOf(total), String.valueOf(totalErrors));
|
2014-03-19 15:22:35 +01:00
|
|
|
info.setText(text);
|
2014-03-18 18:22:39 +01:00
|
|
|
Log.debug(text);
|
|
|
|
}
|
|
|
|
|
2014-04-04 12:33:26 +02:00
|
|
|
protected ArrayList<ReplaceEntry> getRecord(ArrayList<Occurrences> entries) {
|
2014-03-18 18:22:39 +01:00
|
|
|
ArrayList<ReplaceEntry> records = new ArrayList<ReplaceEntry>();
|
2014-04-04 12:33:26 +02:00
|
|
|
try {
|
|
|
|
for (Occurrences entry : entries)
|
|
|
|
records.add(getRecord(entry));
|
|
|
|
|
|
|
|
} catch (Throwable e) {
|
2014-04-04 16:04:09 +02:00
|
|
|
Log.debug("Error creating records:" + e.getLocalizedMessage());
|
2014-04-04 12:33:26 +02:00
|
|
|
e.printStackTrace();
|
|
|
|
}
|
2014-03-18 18:22:39 +01:00
|
|
|
return records;
|
2014-04-04 12:33:26 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
}
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-07-10 18:16:46 +02:00
|
|
|
//
|
2014-04-04 12:33:26 +02:00
|
|
|
protected ReplaceEntry getRecord(Occurrences entry) {
|
2014-04-03 18:36:55 +02:00
|
|
|
ReplaceEntry data = null;
|
2014-07-10 18:16:46 +02:00
|
|
|
if (conditionCode == null) {
|
|
|
|
if (column.isViewColumn()) {
|
|
|
|
data = new ReplaceEntry(entry.getValue(), entry.getRowId(),
|
|
|
|
entry.getNumber(), null, null);
|
|
|
|
} else {
|
2014-07-16 16:50:55 +02:00
|
|
|
data = new ReplaceEntry(entry.getValue(), entry.getNumber(),
|
|
|
|
null, null);
|
2014-07-10 18:16:46 +02:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
} else {
|
2014-07-10 18:16:46 +02:00
|
|
|
switch (conditionCode) {
|
|
|
|
case AllowedColumnType:
|
|
|
|
break;
|
|
|
|
case AmbiguousValueOnExternalReference:
|
|
|
|
data = new ReplaceEntry(entry.getValue(), entry.getRowId(),
|
|
|
|
entry.getNumber(), null, null);
|
|
|
|
break;
|
|
|
|
case CastValidation:
|
|
|
|
break;
|
|
|
|
case CodeNamePresence:
|
|
|
|
break;
|
|
|
|
case DuplicateTupleValidation:
|
|
|
|
break;
|
|
|
|
case DuplicateValueInColumn:
|
|
|
|
break;
|
|
|
|
case GenericTupleValidity:
|
|
|
|
break;
|
|
|
|
case GenericValidity:
|
|
|
|
break;
|
|
|
|
case MaxOneCodenameForDataLocale:
|
|
|
|
break;
|
|
|
|
case MissingValueOnExternalReference:
|
|
|
|
if (column.isViewColumn()) {
|
|
|
|
data = new ReplaceEntry(entry.getValue(), entry.getRowId(),
|
|
|
|
entry.getNumber(), null, null);
|
|
|
|
} else {
|
2014-07-16 16:50:55 +02:00
|
|
|
data = new ReplaceEntry(entry.getValue(),
|
|
|
|
entry.getNumber(), null, null);
|
2014-07-10 18:16:46 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case MustContainAtLeastOneDimension:
|
|
|
|
break;
|
|
|
|
case MustContainAtLeastOneMeasure:
|
|
|
|
break;
|
|
|
|
case MustHaveDataLocaleMetadataAndAtLeastOneLabel:
|
|
|
|
break;
|
|
|
|
case OnlyOneCodeColumn:
|
|
|
|
break;
|
|
|
|
case OnlyOneCodenameColumn:
|
|
|
|
break;
|
|
|
|
case ValidPeriodFormat:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
if (column.isViewColumn()) {
|
|
|
|
data = new ReplaceEntry(entry.getValue(), entry.getRowId(),
|
|
|
|
entry.getNumber(), null, null);
|
|
|
|
} else {
|
2014-07-16 16:50:55 +02:00
|
|
|
data = new ReplaceEntry(entry.getValue(),
|
|
|
|
entry.getNumber(), null, null);
|
2014-07-10 18:16:46 +02:00
|
|
|
}
|
|
|
|
break;
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-07-10 18:16:46 +02:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
}
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-03-18 18:22:39 +01:00
|
|
|
return data;
|
2014-03-17 18:59:08 +01:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
|
|
|
|
protected void startReplaceEntry(int rowIndex) {
|
|
|
|
currentRowIndex = rowIndex;
|
|
|
|
currentReplaceEntry = store.get(rowIndex);
|
|
|
|
Log.debug(currentReplaceEntry.toString() + " was clicked.[rowIndex="
|
|
|
|
+ currentRowIndex + " ]");
|
2014-05-21 12:48:16 +02:00
|
|
|
if (!curation) {
|
|
|
|
Log.debug("Not in curation from validation");
|
|
|
|
if (column.isViewColumn()) {
|
|
|
|
callDimensionRowSelectionDialog();
|
|
|
|
} else {
|
|
|
|
callSingleValueReplaceDialog();
|
|
|
|
|
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
} else {
|
2014-05-21 12:48:16 +02:00
|
|
|
Log.debug("In curation from validation");
|
2014-07-16 16:50:55 +02:00
|
|
|
if (connection != null) {
|
2014-05-21 12:48:16 +02:00
|
|
|
callDimensionRowSelectionDialog();
|
|
|
|
} else {
|
2014-07-16 16:50:55 +02:00
|
|
|
|
2014-05-21 12:48:16 +02:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
}
|
2014-03-19 16:48:15 +01:00
|
|
|
}
|
2014-04-02 17:18:19 +02:00
|
|
|
|
|
|
|
protected void save() {
|
2014-04-04 12:33:26 +02:00
|
|
|
ArrayList<ReplaceEntry> effectiveReplaceList = new ArrayList<ReplaceEntry>();
|
|
|
|
for (ReplaceEntry re : store.getAll()) {
|
|
|
|
if (re.getReplacementValue() != null) {
|
2014-04-03 18:36:55 +02:00
|
|
|
effectiveReplaceList.add(re);
|
|
|
|
}
|
2014-04-04 12:33:26 +02:00
|
|
|
|
2014-04-03 18:36:55 +02:00
|
|
|
}
|
2014-04-04 12:33:26 +02:00
|
|
|
|
|
|
|
if (effectiveReplaceList.size() == 0) {
|
|
|
|
UtilsGXT3
|
|
|
|
.alert("Attention", "Select at least one value to replace");
|
2014-04-04 19:03:49 +02:00
|
|
|
btnSave.enable();
|
2014-04-03 18:36:55 +02:00
|
|
|
} else {
|
|
|
|
startReplaceBatch(effectiveReplaceList);
|
2014-04-04 12:33:26 +02:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
}
|
2014-04-04 12:33:26 +02:00
|
|
|
|
|
|
|
protected void startReplaceBatch(
|
|
|
|
ArrayList<ReplaceEntry> effectiveReplaceList) {
|
|
|
|
ReplaceBatchColumnSession replaceBatchColumnSession = new ReplaceBatchColumnSession(
|
2014-07-16 16:50:55 +02:00
|
|
|
trId, column, effectiveReplaceList, column.isViewColumn(),
|
|
|
|
connection);
|
2014-04-04 10:28:03 +02:00
|
|
|
parent.startBatchReplace(replaceBatchColumnSession);
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void close() {
|
2014-03-26 19:10:25 +01:00
|
|
|
parent.close();
|
2014-03-19 16:48:15 +01:00
|
|
|
}
|
2014-04-03 18:36:55 +02:00
|
|
|
|
|
|
|
protected void callSingleValueReplaceDialog() {
|
|
|
|
Log.debug("callSingleValueReplaceDialog");
|
2014-04-11 18:23:20 +02:00
|
|
|
simpleReplace = true;
|
|
|
|
if (connection == null) {
|
|
|
|
SingleValueReplaceDialog dialogSingleValueReplace = new SingleValueReplaceDialog(
|
|
|
|
currentReplaceEntry.getValue(),
|
|
|
|
currentReplaceEntry.getReplacementValue(), column, eventBus);
|
|
|
|
dialogSingleValueReplace.addListener(this);
|
|
|
|
dialogSingleValueReplace.show();
|
|
|
|
} else {
|
|
|
|
Log.debug("callDimensionRowSelectionDialog");
|
|
|
|
CellData cellData = new CellData(currentReplaceEntry.getValue(),
|
|
|
|
connection.getName(), connection.getColumnId(),
|
|
|
|
connection.getLabel(), currentReplaceEntry.getRowId(), 0, 0);
|
|
|
|
DimensionRowSelectionDialog dialogDimensionRowSelection = new DimensionRowSelectionDialog(
|
2014-07-30 12:59:26 +02:00
|
|
|
connection, cellData, true, eventBus);
|
2014-04-11 18:23:20 +02:00
|
|
|
dialogDimensionRowSelection.addListener(this);
|
|
|
|
dialogDimensionRowSelection.show();
|
|
|
|
}
|
|
|
|
|
2014-04-03 18:36:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void callDimensionRowSelectionDialog() {
|
2014-04-11 18:23:20 +02:00
|
|
|
simpleReplace = false;
|
2014-04-03 18:36:55 +02:00
|
|
|
Log.debug("callDimensionRowSelectionDialog");
|
2014-07-16 16:50:55 +02:00
|
|
|
CellData cellData = null;
|
|
|
|
ColumnData col = null;
|
|
|
|
boolean workOnTable = false;
|
|
|
|
if (curation) {
|
|
|
|
if (connection != null) {
|
2014-05-21 12:48:16 +02:00
|
|
|
cellData = new CellData(currentReplaceEntry.getValue(),
|
2014-07-16 16:50:55 +02:00
|
|
|
connection.getName(), connection.getColumnId(),
|
|
|
|
connection.getLabel(), currentReplaceEntry.getRowId(),
|
|
|
|
0, 0);
|
|
|
|
col = connection;
|
|
|
|
workOnTable = true;
|
|
|
|
|
2014-05-21 12:48:16 +02:00
|
|
|
} else {
|
|
|
|
Log.error("No connection retrieved");
|
|
|
|
}
|
2014-07-16 16:50:55 +02:00
|
|
|
Log.debug("Col: " + col + ", CellData:" + cellData);
|
|
|
|
DimensionRowSelectionDialog dialogDimensionRowSelection;
|
2014-07-30 12:59:26 +02:00
|
|
|
|
|
|
|
switch (conditionCode) {
|
2014-07-16 16:50:55 +02:00
|
|
|
case AllowedColumnType:
|
|
|
|
break;
|
|
|
|
case AmbiguousValueOnExternalReference:
|
|
|
|
dialogDimensionRowSelection = new DimensionRowSelectionDialog(
|
2014-07-30 12:59:26 +02:00
|
|
|
col, cellData, workOnTable, true, true, true, false,
|
|
|
|
eventBus);
|
2014-07-16 16:50:55 +02:00
|
|
|
dialogDimensionRowSelection.addListener(this);
|
|
|
|
dialogDimensionRowSelection.show();
|
|
|
|
break;
|
|
|
|
case CastValidation:
|
|
|
|
break;
|
|
|
|
case CodeNamePresence:
|
|
|
|
break;
|
|
|
|
case DuplicateTupleValidation:
|
|
|
|
break;
|
|
|
|
case DuplicateValueInColumn:
|
|
|
|
break;
|
|
|
|
case GenericTupleValidity:
|
|
|
|
break;
|
|
|
|
case GenericValidity:
|
|
|
|
break;
|
|
|
|
case MaxOneCodenameForDataLocale:
|
|
|
|
break;
|
|
|
|
case MissingValueOnExternalReference:
|
|
|
|
dialogDimensionRowSelection = new DimensionRowSelectionDialog(
|
|
|
|
col, cellData, workOnTable, eventBus);
|
|
|
|
dialogDimensionRowSelection.addListener(this);
|
|
|
|
dialogDimensionRowSelection.show();
|
|
|
|
break;
|
|
|
|
case MustContainAtLeastOneDimension:
|
|
|
|
break;
|
|
|
|
case MustContainAtLeastOneMeasure:
|
|
|
|
break;
|
|
|
|
case MustHaveDataLocaleMetadataAndAtLeastOneLabel:
|
|
|
|
break;
|
|
|
|
case OnlyOneCodeColumn:
|
|
|
|
break;
|
|
|
|
case OnlyOneCodenameColumn:
|
|
|
|
break;
|
|
|
|
case ValidPeriodFormat:
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
dialogDimensionRowSelection = new DimensionRowSelectionDialog(
|
|
|
|
col, cellData, workOnTable, eventBus);
|
|
|
|
dialogDimensionRowSelection.addListener(this);
|
|
|
|
dialogDimensionRowSelection.show();
|
|
|
|
break;
|
2014-07-30 12:59:26 +02:00
|
|
|
|
2014-07-16 16:50:55 +02:00
|
|
|
}
|
2014-07-30 12:59:26 +02:00
|
|
|
|
2014-05-21 12:48:16 +02:00
|
|
|
} else {
|
|
|
|
cellData = new CellData(currentReplaceEntry.getValue(),
|
2014-07-16 16:50:55 +02:00
|
|
|
column.getName(), column.getColumnId(), column.getLabel(),
|
|
|
|
currentReplaceEntry.getRowId(), 0, 0);
|
|
|
|
col = column;
|
|
|
|
workOnTable = false;
|
2014-04-03 18:36:55 +02:00
|
|
|
|
2014-07-16 16:50:55 +02:00
|
|
|
Log.debug("Col: " + col + ", CellData:" + cellData);
|
|
|
|
DimensionRowSelectionDialog dialogDimensionRowSelection = new DimensionRowSelectionDialog(
|
|
|
|
col, cellData, workOnTable, eventBus);
|
|
|
|
dialogDimensionRowSelection.addListener(this);
|
|
|
|
dialogDimensionRowSelection.show();
|
|
|
|
}
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-11 16:12:21 +02:00
|
|
|
public void selectedDimensionRow(DimensionRow dimensionRow) {
|
|
|
|
Log.debug("Change Value: " + dimensionRow);
|
2014-04-11 18:23:20 +02:00
|
|
|
if (simpleReplace) {
|
|
|
|
currentReplaceEntry.setReplacementValue(dimensionRow.getValue());
|
|
|
|
store.update(currentReplaceEntry);
|
|
|
|
updateInfo();
|
|
|
|
} else {
|
|
|
|
currentReplaceEntry.setReplacementValue(dimensionRow.getValue());
|
|
|
|
currentReplaceEntry.setReplacementDimensionRow(dimensionRow);
|
|
|
|
store.update(currentReplaceEntry);
|
|
|
|
updateInfo();
|
|
|
|
}
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-11 16:12:21 +02:00
|
|
|
public void abortedDimensionRowSelection() {
|
2014-04-03 18:36:55 +02:00
|
|
|
Log.debug("Change Value Aborted");
|
|
|
|
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-11 16:12:21 +02:00
|
|
|
public void failedDimensionRowSelection(String reason, String detail) {
|
2014-04-03 18:36:55 +02:00
|
|
|
Log.error("Change Value Failed:" + reason + " " + detail);
|
|
|
|
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2014-04-11 16:12:21 +02:00
|
|
|
public void selectedSingleValueReplace(String replaceValue) {
|
|
|
|
Log.debug("Change Value: " + replaceValue);
|
|
|
|
currentReplaceEntry.setReplacementValue(replaceValue);
|
2014-04-03 18:36:55 +02:00
|
|
|
store.update(currentReplaceEntry);
|
|
|
|
updateInfo();
|
2014-04-02 17:18:19 +02:00
|
|
|
}
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 16:12:21 +02:00
|
|
|
@Override
|
|
|
|
public void abortedSingleValueReplace() {
|
|
|
|
Log.debug("Change Value Aborted");
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 16:12:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void failedSingleValueReplace(String reason, String detail) {
|
|
|
|
Log.error("Change Value Failed:" + reason + " " + detail);
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 16:12:21 +02:00
|
|
|
}
|
2014-04-11 17:45:20 +02:00
|
|
|
|
|
|
|
protected void connectCodelist() {
|
2014-04-11 16:12:21 +02:00
|
|
|
Log.debug("callConnectCodelistDialog");
|
|
|
|
ConnectCodelistDialog connectCodelistDialog = new ConnectCodelistDialog(
|
|
|
|
eventBus);
|
|
|
|
connectCodelistDialog.addListener(this);
|
|
|
|
connectCodelistDialog.show();
|
2014-04-11 17:45:20 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void disconnectCodelist() {
|
|
|
|
Log.debug("Disconnect codelist");
|
2014-04-11 18:23:20 +02:00
|
|
|
this.connection = null;
|
2014-04-11 17:45:20 +02:00
|
|
|
connectionField.setValue("");
|
|
|
|
connectionField.setVisible(false);
|
|
|
|
btnDisconnect.setVisible(false);
|
|
|
|
btnConnect.setVisible(true);
|
|
|
|
btnConnect.enable();
|
|
|
|
toolBarHead.forceLayout();
|
2014-04-11 16:12:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void selectedConnectCodelist(ColumnData connection) {
|
2014-04-11 17:45:20 +02:00
|
|
|
Log.debug("Selected connection: " + connection);
|
2014-04-11 18:23:20 +02:00
|
|
|
this.connection = connection;
|
2014-04-11 17:45:20 +02:00
|
|
|
connectionField.setValue(connection.getLabel());
|
|
|
|
connectionField.setVisible(true);
|
|
|
|
btnDisconnect.setVisible(true);
|
|
|
|
btnConnect.setVisible(false);
|
2014-04-11 16:12:21 +02:00
|
|
|
btnConnect.enable();
|
2014-04-11 17:45:20 +02:00
|
|
|
toolBarHead.forceLayout();
|
2014-04-11 16:12:21 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void abortedConnectCodelist() {
|
|
|
|
Log.debug("Connection Aborted");
|
|
|
|
btnConnect.enable();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void failedConnectCodelist(String reason, String detail) {
|
2014-04-11 17:45:20 +02:00
|
|
|
Log.debug("Connection Failed: " + reason + " " + detail);
|
|
|
|
UtilsGXT3.alert("Error on connect", reason);
|
2014-04-11 16:12:21 +02:00
|
|
|
btnConnect.enable();
|
2014-04-11 17:45:20 +02:00
|
|
|
|
2014-04-11 16:12:21 +02:00
|
|
|
}
|
2014-05-21 12:48:16 +02:00
|
|
|
|
|
|
|
protected void retrieveConnection() {
|
|
|
|
Log.debug("Retrieve Connection RefColumn:" + refColumn);
|
2014-05-20 18:54:30 +02:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
2014-05-21 12:48:16 +02:00
|
|
|
|
2014-05-20 18:54:30 +02:00
|
|
|
}
|
2014-03-18 18:22:39 +01:00
|
|
|
|
2014-07-30 12:59:26 +02:00
|
|
|
protected void retrieveConnectionForViewColumn(RefColumn refCol) {
|
|
|
|
Log.debug("Retrieve Connection For View Column: " + refCol);
|
|
|
|
TDGWTServiceAsync.INSTANCE.getConnection(refCol,
|
|
|
|
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;
|
|
|
|
setConnectionForViewColumn();
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void setConnectionForViewColumn() {
|
|
|
|
Log.debug("Selected connection: " + connection);
|
|
|
|
connectionField.setValue(connection.getLabel());
|
|
|
|
connectionField.setVisible(true);
|
|
|
|
toolBarHead.forceLayout();
|
|
|
|
}
|
|
|
|
|
2014-03-17 18:59:08 +01:00
|
|
|
}
|