diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java index 23c7815..18dd38b 100644 --- a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java @@ -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(new KeyProvider()); @@ -226,23 +226,9 @@ public class ValidationsTasksPanel extends FramedPanel implements } }); - /* - * ColumnConfig cc2 = new ColumnConfig( new ValueProvider() { - * - * @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 cc3 = new ColumnConfig( + ColumnConfig cc2 = new ColumnConfig( new ValueProvider() { @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> l = new ArrayList>(); l.add(cc1); // l.add(cc2); - l.add(cc3); + l.add(cc2); ColumnModel cm = new ColumnModel(l); tree = new TreeGrid(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() {