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
This commit is contained in:
parent
85767c69fe
commit
bcb3aa31da
|
@ -93,63 +93,6 @@ public class ValidationsTasksPanel extends FramedPanel implements
|
|||
protected TreeStore<BaseDto> store;
|
||||
protected TreeGrid<BaseDto> tree;
|
||||
|
||||
// TODO remove this variable
|
||||
@SuppressWarnings("rawtypes")
|
||||
protected AbstractCell actionButton = new AbstractCell<Boolean>() {
|
||||
|
||||
@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<BaseDto> 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("<img src='"
|
||||
+ ResourceBundle.INSTANCE.ok().getSafeUri()
|
||||
.asString() + "' alt='true' title='"
|
||||
+ title + "'>");
|
||||
|
||||
} else {
|
||||
sb.appendHtmlConstant("<img src='"
|
||||
+ ResourceBundle.INSTANCE.exit().getSafeUri()
|
||||
.asString() + "' alt='false' title='"
|
||||
+ title + "'>");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
class KeyProvider implements ModelKeyProvider<BaseDto> {
|
||||
@Override
|
||||
public String getKey(BaseDto item) {
|
||||
|
@ -270,15 +213,10 @@ public class ValidationsTasksPanel extends FramedPanel implements
|
|||
|
||||
List<ColumnConfig<BaseDto, ?>> l = new ArrayList<ColumnConfig<BaseDto, ?>>();
|
||||
l.add(cc1);
|
||||
// l.add(cc2);
|
||||
l.add(cc2);
|
||||
ColumnModel<BaseDto> cm = new ColumnModel<BaseDto>(l);
|
||||
|
||||
tree = new TreeGrid<BaseDto>(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<String, Object> map = new HashMap<String, Object>();
|
||||
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<Boolean>() {
|
||||
//
|
||||
// @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<BaseDto> 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("<img src='"
|
||||
// + ResourceBundle.INSTANCE.ok().getSafeUri()
|
||||
// .asString() + "' alt='true' title='"
|
||||
// + title + "'>");
|
||||
//
|
||||
// } else {
|
||||
// sb.appendHtmlConstant("<img src='"
|
||||
// + ResourceBundle.INSTANCE.exit().getSafeUri()
|
||||
// .asString() + "' alt='false' title='"
|
||||
// + title + "'>");
|
||||
//
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// };
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue