[SYNCOPE-1314] fixed wrong status outcome on bulk action invoked from Reconciliation
authorAndrea Patricelli <andreapatricelli@apache.org>
Thu, 24 May 2018 08:31:56 +0000 (10:31 +0200)
committerAndrea Patricelli <andreapatricelli@apache.org>
Thu, 24 May 2018 10:27:35 +0000 (12:27 +0200)
client/console/src/main/java/org/apache/syncope/client/console/bulk/BulkContent.java
client/console/src/main/java/org/apache/syncope/client/console/status/ResourceStatusDirectoryPanel.java

index 4287521..552b843 100644 (file)
@@ -135,8 +135,6 @@ public class BulkContent<T extends Serializable, S> extends MultilevelPanel.Seco
                             throw new IllegalArgumentException("Invalid items");
                         }
 
-                        String fieldName = keyFieldName;
-
                         BulkActionResult res = null;
                         try {
                             T singleItem = items.iterator().next();
@@ -225,12 +223,10 @@ public class BulkContent<T extends Serializable, S> extends MultilevelPanel.Seco
                                     case REACTIVATE:
                                         res = ((UserRestClient) anyRestClient).
                                                 reactivate(etag, entry.getKey(), entry.getValue());
-                                        fieldName = "resource";
                                         break;
                                     case SUSPEND:
                                         res = ((UserRestClient) anyRestClient).
                                                 suspend(etag, entry.getKey(), entry.getValue());
-                                        fieldName = "resource";
                                         break;
                                     default:
                                 }
@@ -242,7 +238,7 @@ public class BulkContent<T extends Serializable, S> extends MultilevelPanel.Seco
                         }
 
                         final List<IColumn<T, S>> newColumnList = new ArrayList<>(columns);
-                        newColumnList.add(newColumnList.size(), new BulkActionResultColumn<>(res, fieldName));
+                        newColumnList.add(newColumnList.size(), new BulkActionResultColumn<>(res, keyFieldName));
 
                         container.addOrReplace(new AjaxFallbackDefaultDataTable<>(
                                 "selectedObjects",
index c75dce3..8b621bc 100644 (file)
@@ -81,7 +81,7 @@ public class ResourceStatusDirectoryPanel
         this.multiLevelPanelRef = multiLevelPanelRef;
         this.type = type;
         this.resource = resource;
-        this.itemKeyFieldName = "name";
+        this.itemKeyFieldName = "resource";
 
         initResultTable();
     }