Updated Ambiguous

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@98559 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-07-10 16:14:55 +00:00 committed by Giancarlo Panichi
parent c4c11654f1
commit 85767c69fe
1 changed files with 13 additions and 29 deletions

View File

@ -200,7 +200,7 @@ public class ValidationsTasksPanel extends FramedPanel implements
protected void create() {
con = new VerticalLayoutContainer();
con.setScrollMode(ScrollMode.AUTO);
// con.setAdjustForScroll(true);
store = new TreeStore<BaseDto>(new KeyProvider());
@ -226,23 +226,9 @@ public class ValidationsTasksPanel extends FramedPanel implements
}
});
/*
* ColumnConfig<BaseDto, String> cc2 = new ColumnConfig<BaseDto,
* String>( new ValueProvider<BaseDto, String>() {
*
* @Override public String getValue(BaseDto object) { return object
* instanceof ValidationDto ? ((ValidationDto) object) .getDescription()
* : ""; }
*
* @Override public void setValue(BaseDto object, String value) { if
* (object instanceof ValidationDto) { ((ValidationDto)
* object).setDescription(value); } }
*
* @Override public String getPath() { return "description"; } });
* cc2.setHeader("Description");
*/
ColumnConfig<BaseDto, Boolean> cc3 = new ColumnConfig<BaseDto, Boolean>(
ColumnConfig<BaseDto, Boolean> cc2 = new ColumnConfig<BaseDto, Boolean>(
new ValueProvider<BaseDto, Boolean>() {
@Override
@ -263,7 +249,7 @@ public class ValidationsTasksPanel extends FramedPanel implements
return "valid";
}
}, 38, "Valid");
cc3.setHeader("Valid");
cc2.setHeader("Valid");
ValidationCell validationButton = new ValidationCell();
validationButton.setTrueIcon(ResourceBundle.INSTANCE.ok());
@ -280,12 +266,12 @@ public class ValidationsTasksPanel extends FramedPanel implements
* } });
*/
cc3.setCell(validationButton);
cc2.setCell(validationButton);
List<ColumnConfig<BaseDto, ?>> l = new ArrayList<ColumnConfig<BaseDto, ?>>();
l.add(cc1);
// l.add(cc2);
l.add(cc3);
l.add(cc2);
ColumnModel<BaseDto> cm = new ColumnModel<BaseDto>(l);
tree = new TreeGrid<BaseDto>(store, cm, cc1);
@ -346,7 +332,6 @@ public class ValidationsTasksPanel extends FramedPanel implements
ToolBar toolBar = new ToolBar();
TextButton btnExpandAll = new TextButton();
// btnReload.setText("Expand All");
btnExpandAll.setIcon(ResourceBundle.INSTANCE.magnifierZoomIn());
btnExpandAll.setToolTip("Expand All");
btnExpandAll.addSelectHandler(new SelectHandler() {
@ -360,7 +345,6 @@ public class ValidationsTasksPanel extends FramedPanel implements
toolBar.add(btnExpandAll);
TextButton btnCollapseAll = new TextButton();
// btnReload.setText("Expand All");
btnCollapseAll.setIcon(ResourceBundle.INSTANCE.magnifierZoomOut());
btnCollapseAll.setToolTip("Collapse All");
btnCollapseAll.addSelectHandler(new SelectHandler() {
@ -377,6 +361,8 @@ public class ValidationsTasksPanel extends FramedPanel implements
con.add(tree, new VerticalLayoutData(1, -1));
add(con, new MarginData(0));
forceLayout();
}
@ -387,7 +373,6 @@ public class ValidationsTasksPanel extends FramedPanel implements
}
protected void requestResolve(BaseDto d) {
// String title = "";
if (d != null) {
Log.debug(d.toString());
if (d instanceof ValidationDto) {
@ -402,12 +387,12 @@ public class ValidationsTasksPanel extends FramedPanel implements
} else {
if (v.getInvocation() != null) {
InvocationS invocationS = v.getInvocation();
// title = invocationS.toString();
Long op = invocationS.getOperationId();
if (op.compareTo(OperationsId.ChangeToDimensionColumn
.toLong()) == 0) {
if (v.getConditionCode() == ConditionCode.MissingValueOnExternalReference
|| v.getConditionCode() == ConditionCode.AmbigousValueOnExternalReference) {
|| v.getConditionCode() == ConditionCode.AmbiguousValueOnExternalReference) {
WidgetRequestEvent widgetRequestEvent = new WidgetRequestEvent(
WidgetRequestType.CURATIONBYREPLACEBATCHDIALOG);
widgetRequestEvent.setTrId(trId);
@ -501,7 +486,7 @@ public class ValidationsTasksPanel extends FramedPanel implements
}
});
// contextMenu.add(resumeItem);
tree.setContextMenu(contextMenu);
@ -532,7 +517,7 @@ public class ValidationsTasksPanel extends FramedPanel implements
if (op.compareTo(OperationsId.ChangeToDimensionColumn
.toLong()) == 0
&& (v.getConditionCode() == ConditionCode.MissingValueOnExternalReference || v
.getConditionCode() == ConditionCode.AmbigousValueOnExternalReference)) {
.getConditionCode() == ConditionCode.AmbiguousValueOnExternalReference)) {
contextMenu.clear();
contextMenu.add(resolveItem);
contextMenu.add(resumeItem);
@ -592,13 +577,12 @@ public class ValidationsTasksPanel extends FramedPanel implements
public void update() {
retrieveCurrentTR();
forceLayout();
}
public void update(TRId trId) {
this.trId = trId;
draw();
forceLayout();
}
protected void retrieveCurrentTR() {