[overlord-commits] Overlord SVN: r1059 - bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Mon Jul 5 04:20:24 EDT 2010


Author: heiko.braun at jboss.com
Date: 2010-07-05 04:20:24 -0400 (Mon, 05 Jul 2010)
New Revision: 1059

Modified:
   bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
Log:
disable delete deployment btn in riftsaw profile

Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java	2010-07-05 08:00:32 UTC (rev 1058)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/engine/DeploymentListView.java	2010-07-05 08:20:24 UTC (rev 1059)
@@ -38,6 +38,8 @@
 import org.gwt.mosaic.ui.client.event.RowSelectionHandler;
 import org.gwt.mosaic.ui.client.layout.*;
 import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.ConsoleConfig;
 import org.jboss.bpm.console.client.common.DataDriven;
 import org.jboss.bpm.console.client.common.LoadingOverlay;
 import org.jboss.bpm.console.client.model.DeploymentRef;
@@ -79,10 +81,15 @@
 
   MosaicPanel panel;
 
+  private boolean isRiftsawInstance = false;
+
   public DeploymentListView()
   {
     controller = Registry.get(Controller.class);
 
+    // riftsaw?
+    ConsoleConfig config = Registry.get(ApplicationContext.class).getConfig();
+    isRiftsawInstance = config.getProfileName().equals("BPEL Console");
   }
 
   public void provideWidget(ProvisioningCallback callback)
@@ -204,39 +211,42 @@
       );
 
 
-      toolBar.add(
-          new Button("Delete", new ClickHandler() {
-            public void onClick(ClickEvent clickEvent)
-            {
-              DeploymentRef deploymentRef = getSelection();
-              if(deploymentRef!=null)
-              {
-                MessageBox.confirm("Delete deployment",
-                    "Do you want to delete this deployment? Any related data will be removed.",
-                    new MessageBox.ConfirmationCallback() {
-                      public void onResult(boolean doIt)
-                      {
-                        if(doIt)
-                        {
-                          controller.handleEvent(
-                              new Event(
-                                  DeleteDeploymentAction.ID,
-                                  getSelection().getId()
-                              )
-                          );
-                        }
-                      }
-                    });
-              }
-              else
-              {
-                MessageBox.alert("Missing selection", "Please select a deployment");
-              }
-            }
+      Button deleteBtn = new Button("Delete", new ClickHandler()
+      {
+        public void onClick(ClickEvent clickEvent)
+        {
+          DeploymentRef deploymentRef = getSelection();
+          if (deploymentRef != null)
+          {
+            MessageBox.confirm("Delete deployment",
+                "Do you want to delete this deployment? Any related data will be removed.",
+                new MessageBox.ConfirmationCallback()
+                {
+                  public void onResult(boolean doIt)
+                  {
+                    if (doIt)
+                    {
+                      controller.handleEvent(
+                          new Event(
+                              DeleteDeploymentAction.ID,
+                              getSelection().getId()
+                          )
+                      );
+                    }
+                  }
+                });
           }
-          )
+          else
+          {
+            MessageBox.alert("Missing selection", "Please select a deployment");
+          }
+        }
+      }
       );
 
+      if(!isRiftsawInstance)
+        toolBar.add(deleteBtn);
+
       toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
 
       // filter



More information about the overlord-commits mailing list