Index: RestApiHandlers.java
===================================================================
--- RestApiHandlers.java	(revision 52135)
+++ RestApiHandlers.java	(working copy)
@@ -55,6 +55,7 @@
 import org.glassfish.admingui.common.util.GuiUtil;
 import org.glassfish.admingui.common.util.RestResponse;
 import org.glassfish.admingui.common.util.RestUtil;
+import org.glassfish.admingui.common.util.TargetUtil;
 import static org.glassfish.admingui.common.util.RestUtil.appendEncodedSegment;
 import static org.glassfish.admingui.common.util.RestUtil.buildChildEntityList;
 import static org.glassfish.admingui.common.util.RestUtil.buildDefaultValueMap;
@@ -244,6 +245,7 @@
      */
     @Handler(id = "gf.updateEntity",
             input = {
+                    @HandlerInput(name = "clusterName", type = String.class, required = true),
                     @HandlerInput(name = "endpoint", type = String.class, required = true),
                     @HandlerInput(name = "attrs", type = Map.class, required = true),
                     @HandlerInput(name = "skipAttrs", type = List.class),
@@ -254,6 +256,11 @@
             })
     public static void updateEntity(HandlerContext handlerCtx) {
         Map<String, Object> attrs = (Map) handlerCtx.getInputValue("attrs");
+        String clusterName = (String) handlerCtx.getInputValue("clusterName");
+        if(!TargetUtil.getClusters().contains(clusterName)){
+            GuiUtil.handleError(handlerCtx, GuiUtil.getMessage("msg.NoSuchCluster"));
+            return;
+        }
         if (attrs == null) {
             attrs = new HashMap<String, Object>();
         }
