From bcb3aa31dae65008e19704e1ee03517a61019867 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 17 Jul 2014 09:47:35 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@98732 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../validation/ValidationsTasksPanel.java | 128 ++++++++---------- 1 file changed, 59 insertions(+), 69 deletions(-) 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 18dd38b..f4d8179 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 @@ -93,63 +93,6 @@ public class ValidationsTasksPanel extends FramedPanel implements protected TreeStore store; protected TreeGrid tree; - // TODO remove this variable - @SuppressWarnings("rawtypes") - protected AbstractCell actionButton = new AbstractCell() { - - @Override - public void render(Context context, Boolean value, SafeHtmlBuilder sb) { - - if (value == null) { - sb.appendHtmlConstant(""); - } else { - Log.debug("Context: pos=" + context.getIndex() + ", key=" - + context.getKey() + ", column=" + context.getColumn()); - String key = (String) context.getKey(); - BaseDto d = store.findModelWithKey(key); - - /* - * List list = ; - * Log.debug("List: ["+list.toString()+"]"); int i = 0; BaseDto - * d=null; for (; i < list.size(); i++) { BaseDto dt = - * list.get(i); if (dt.getId().compareTo((String) - * context.getKey()) == 0) { d=dt; - * Log.debug("Retrieved: "+d+" at pos:"+i); break; } } - */ - - String title = ""; - if (d != null) { - Log.debug(d.toString()); - if (d instanceof ValidationDto) { - ValidationDto v = (ValidationDto) d; - Log.debug("ValidationDto: [" + v.getId() + ", " - + v.getDescription() + ", " + v.getValid() - + ", " + v.getInvocation() + "]"); - if (v.getInvocation() != null) { - title = v.getInvocation().toString(); - } - } - } - - if (value) { - - sb.appendHtmlConstant("true"); - - } else { - sb.appendHtmlConstant("false"); - - } - } - - } - }; - class KeyProvider implements ModelKeyProvider { @Override public String getKey(BaseDto item) { @@ -270,15 +213,10 @@ public class ValidationsTasksPanel extends FramedPanel implements List> l = new ArrayList>(); l.add(cc1); - // l.add(cc2); l.add(cc2); ColumnModel cm = new ColumnModel(l); tree = new TreeGrid(store, cm, cc1); - // tree.getStyle().setLeafIcon(ResourceBundle.INSTANCE.tableValidation()); - - // tree.getView().setStripeRows(true); - // tree.getView().setColumnLines(true); tree.getView().setAutoFill(true); tree.setBorders(false); tree.setLoadMask(true); @@ -399,12 +337,6 @@ public class ValidationsTasksPanel extends FramedPanel implements HashMap map = new HashMap(); map.put(Constants.REQUEST_PROPERTIES_INVOCATIONS, invocationS); - /*map.put(Constants.REQUEST_PROPERTIES_REFCOLUMN, - invocationS.getRefColumn()); - map.put(Constants.REQUEST_PROPERTIES_COLUMNID, - invocationS.getColumnId()); - map.put(Constants.REQUEST_PROPERTIES_TASKID, - invocationS.getTaskId());*/ map.put(Constants.REQUEST_PROPERTIES_CONDITIONCODE, v.getConditionCode()); map.put(Constants.REQUEST_PROPERTIES_VALIDATIONCOLUMNCOLUMNID, @@ -673,5 +605,63 @@ public class ValidationsTasksPanel extends FramedPanel implements eventBus.fireEvent(changeTableRequestEvent); } - + + + +// @SuppressWarnings("rawtypes") +// protected AbstractCell actionButton = new AbstractCell() { +// +// @Override +// public void render(Context context, Boolean value, SafeHtmlBuilder sb) { +// +// if (value == null) { +// sb.appendHtmlConstant(""); +// } else { +// Log.debug("Context: pos=" + context.getIndex() + ", key=" +// + context.getKey() + ", column=" + context.getColumn()); +// String key = (String) context.getKey(); +// BaseDto d = store.findModelWithKey(key); +// +// /* +// * List list = ; +// * Log.debug("List: ["+list.toString()+"]"); int i = 0; BaseDto +// * d=null; for (; i < list.size(); i++) { BaseDto dt = +// * list.get(i); if (dt.getId().compareTo((String) +// * context.getKey()) == 0) { d=dt; +// * Log.debug("Retrieved: "+d+" at pos:"+i); break; } } +// */ +// +// String title = ""; +// if (d != null) { +// Log.debug(d.toString()); +// if (d instanceof ValidationDto) { +// ValidationDto v = (ValidationDto) d; +// Log.debug("ValidationDto: [" + v.getId() + ", " +// + v.getDescription() + ", " + v.getValid() +// + ", " + v.getInvocation() + "]"); +// if (v.getInvocation() != null) { +// title = v.getInvocation().toString(); +// } +// } +// } +// +// if (value) { +// +// sb.appendHtmlConstant("true"); +// +// } else { +// sb.appendHtmlConstant("false"); +// +// } +// } +// +// } +// }; + }