Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@93675 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-03-27 17:26:24 +00:00
parent 4a4ed2cd8d
commit 27b026de26
2 changed files with 16 additions and 7 deletions

View File

@ -44,7 +44,7 @@ public class ReplaceColumnProgressUpdater extends Timer {
} }
public void onSuccess(ReplaceColumnMonitor result) { public void onSuccess(ReplaceColumnMonitor result) {
Log.info("retrieved LabelColumnMonitor: " Log.info("retrieved ReplaceColumnMonitor: "
+ result.getStatus()); + result.getStatus());
switch (result.getStatus()) { switch (result.getStatus()) {
case INITIALIZING: case INITIALIZING:

View File

@ -54,7 +54,9 @@ public class ReplacePanel extends FramedPanel implements
protected CellData cellData; protected CellData cellData;
protected ReplaceDialog parent; protected ReplaceDialog parent;
protected ColumnData column; protected ColumnData column;
protected DimensionRow dimensionRow;
protected ReplaceColumnSession replaceColumnSession; protected ReplaceColumnSession replaceColumnSession;
private ComboBox<DimensionRow> comboDimensionType; private ComboBox<DimensionRow> comboDimensionType;
private FieldLabel comboDimensionTypeLabel; private FieldLabel comboDimensionTypeLabel;
@ -71,6 +73,7 @@ public class ReplacePanel extends FramedPanel implements
this.cellData = cellData; this.cellData = cellData;
this.trId = trId; this.trId = trId;
this.eventBus = eventBus; this.eventBus = eventBus;
dimensionRow=null;
Log.debug("ReplacePanel:[" + trId + ", CellData:" + cellData + "]"); Log.debug("ReplacePanel:[" + trId + ", CellData:" + cellData + "]");
initPanel(); initPanel();
retrieveColumn(); retrieveColumn();
@ -199,7 +202,7 @@ public class ReplacePanel extends FramedPanel implements
btnApply.addSelectHandler(new SelectHandler() { btnApply.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) { public void onSelect(SelectEvent event) {
Log.debug("Pressed Apply"); Log.debug("Pressed Apply For Dimension");
replaceValueForDimension(); replaceValueForDimension();
} }
@ -212,7 +215,7 @@ public class ReplacePanel extends FramedPanel implements
btnClose.addSelectHandler(new SelectHandler() { btnClose.addSelectHandler(new SelectHandler() {
public void onSelect(SelectEvent event) { public void onSelect(SelectEvent event) {
Log.debug("Pressed Close"); Log.debug("Pressed Close For Dimension");
close(); close();
} }
@ -251,11 +254,11 @@ public class ReplacePanel extends FramedPanel implements
} }
protected void replaceValueForDimension() { protected void replaceValueForDimension() {
DimensionRow dimRow = comboDimensionType.getCurrentValue(); Log.debug("Current Dimension Row in combo: "+dimensionRow);
if (dimRow == null) { if (dimensionRow == null) {
UtilsGXT3.alert("Attention", "Select a valid value"); UtilsGXT3.alert("Attention", "Select a valid value");
} else { } else {
callReplaceValue(dimRow.getRowId()); callReplaceValue(dimensionRow.getRowId());
} }
} }
@ -306,6 +309,7 @@ public class ReplacePanel extends FramedPanel implements
} }
protected void callReplaceValue(String rValue) { protected void callReplaceValue(String rValue) {
Log.debug("callRepalceValue is Dimension: "+isDimension);
if (isDimension) { if (isDimension) {
replaceColumnSession = new ReplaceColumnSession( replaceColumnSession = new ReplaceColumnSession(
value.getCurrentValue(), rValue, trId, column, value.getCurrentValue(), rValue, trId, column,
@ -379,18 +383,23 @@ public class ReplacePanel extends FramedPanel implements
@Override @Override
public void selected(DimensionRow dimRow) { public void selected(DimensionRow dimRow) {
Log.debug("Selected dimension row: " + dimRow); Log.debug("Selected dimension row: " + dimRow);
dimensionRow=dimRow;
comboDimensionType.setValue(dimRow); comboDimensionType.setValue(dimRow);
} }
@Override @Override
public void aborted() { public void aborted() {
Log.debug("Aborted");
comboDimensionType.setValue(null); comboDimensionType.setValue(null);
dimensionRow=null;
} }
@Override @Override
public void failed(String reason, String detail) { public void failed(String reason, String detail) {
Log.debug("Failed: "+reason+" "+detail);
comboDimensionType.setValue(null); comboDimensionType.setValue(null);
dimensionRow=null;
} }
} }