Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-extractcodelist-widget@96306 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-29 15:59:04 +00:00
parent b0714eb7c2
commit 71da9b38fc
1 changed files with 18 additions and 10 deletions

View File

@ -229,7 +229,7 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
@Override
public void completedDefColumnCreation(DefNewColumn defNewColumn) {
comboDefColumn.setValue(defNewColumn);
comboDefColumn.setValue(defNewColumn,true);
}
@ -291,7 +291,7 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
@Override
public void completedDefColumnCreation(DefNewColumn defNewColumn) {
comboDefColumn.setValue(defNewColumn);
comboDefColumn.setValue(defNewColumn,true);
}
@ -487,11 +487,13 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
for (; i < lenght; i++) {
FieldLabel fieldLabel = (FieldLabel) formLayout.getWidget(i);
String columnId = fieldLabel.getId();
Log.debug("Field id:"+columnId);
ColumnData colCurrent = null;
for (ColumnData col : parent.extractCodelistSession
.getSourceColumns()) {
if (col.getColumnId().compareTo(columnId) == 0) {
colCurrent = col;
Log.debug("Column Match:"+colCurrent);
break;
}
}
@ -502,10 +504,12 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
if(connection==null){
@SuppressWarnings("unchecked")
ComboBox<DefNewColumn> comboDefColumn = (ComboBox<DefNewColumn>) fieldLabel
.getWidget();
DefNewColumn defNewColumn = comboDefColumn.getCurrentValue();
ComboBox<DefNewColumn> comboDefColumn = ((ComboBox<DefNewColumn>) fieldLabel
.getWidget());
DefNewColumn defNewColumn = comboDefColumn.getValue();
Log.debug("Retrieved: "+defNewColumn.toString());
ExtractCodelistTargetColumn extractCodelistTargetColumn = new ExtractCodelistTargetColumn(colCurrent, defNewColumn);
Log.debug("New TargetColumn: "+extractCodelistTargetColumn);
targetColumns.add(extractCodelistTargetColumn);
} else {
@ -520,9 +524,11 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
if(checkNew.getValue()){
@SuppressWarnings("unchecked")
ComboBox<DefNewColumn> comboDefColumn = (ComboBox<DefNewColumn>)flowButton.getItemByItemId(COMBO_DEF_COLUMN);
DefNewColumn defNewColumn = comboDefColumn.getCurrentValue();
ExtractCodelistTargetColumn extractCodelistTargetColumn = new ExtractCodelistTargetColumn(colCurrent, defNewColumn);
targetColumns.add(extractCodelistTargetColumn);
DefNewColumn defNewColumn = comboDefColumn.getValue();
Log.debug("Retrieved: "+defNewColumn.toString());
ExtractCodelistTargetColumn extractCodelistTargetCol = new ExtractCodelistTargetColumn(colCurrent, defNewColumn);
Log.debug("New TargetColumn:"+extractCodelistTargetCol);
targetColumns.add(extractCodelistTargetCol);
} else {
@SuppressWarnings("unchecked")
ComboBox<ColumnData> comboColumn=(ComboBox<ColumnData>)flowButton.getItemByItemId(COMBO_COLUMN);
@ -531,15 +537,17 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
UtilsGXT3.alert("Attention", "Fill all column!");
return false;
} else {
ExtractCodelistTargetColumn extractCodelistTargetColumn = new ExtractCodelistTargetColumn(
ExtractCodelistTargetColumn extractCodelistTargetC = new ExtractCodelistTargetColumn(
colCurrent, columnData, connection.getTrId());
targetColumns.add(extractCodelistTargetColumn);
Log.debug("New TargetColumn:"+extractCodelistTargetC);
targetColumns.add(extractCodelistTargetC);
}
}
}
}
Log.debug("UpdateExtractCodelistSession:"+targetColumns);
parent.extractCodelistSession.setTargetColumns(targetColumns);
return true;
}