From e6e9a8afd6b6313f12e6011a2b5d27e50360e07c Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Thu, 13 Mar 2014 13:47:24 +0000 Subject: [PATCH] Minor Update git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@93050 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/rows/DuplicatesRowsPanel.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/DuplicatesRowsPanel.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/DuplicatesRowsPanel.java index 8761451..4e659e8 100644 --- a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/DuplicatesRowsPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/rows/DuplicatesRowsPanel.java @@ -139,7 +139,7 @@ public class DuplicatesRowsPanel extends FramedPanel { deleteButton.addSelectHandler(deleteHandler); // Validates Button - validatesButton = new TextButton("Validates"); + validatesButton = new TextButton("Validate"); SelectHandler validatesHandler = new SelectHandler() { public void onSelect(SelectEvent event) { @@ -202,7 +202,13 @@ public class DuplicatesRowsPanel extends FramedPanel { } protected void onDeleteDuplicate() { - duplicatesSession = new DuplicatesSession(trId, getSelectedItems(), + ArrayList col=getSelectedItems(); + if(col==null||col.size()<1){ + alert("Attention", + "Attention no column selected!"); + return; + } + duplicatesSession = new DuplicatesSession(trId, col, DuplicatesSession.DuplicateOp.DELETE); TDGWTServiceAsync.INSTANCE.startDuplicates(duplicatesSession, @@ -227,7 +233,13 @@ public class DuplicatesRowsPanel extends FramedPanel { protected void onValidatesDuplicate() { - duplicatesSession = new DuplicatesSession(trId, getSelectedItems(), + ArrayList col=getSelectedItems(); + if(col==null||col.size()<1){ + alert("Attention", + "Attention no column selected!"); + return; + } + duplicatesSession = new DuplicatesSession(trId, col, DuplicatesSession.DuplicateOp.VALIDATE); TDGWTServiceAsync.INSTANCE.startDuplicates(duplicatesSession,