Hi JB,

I have created a patch for KALUMET-55 that I would like to contribute.

I have attached the patch for your review.

cheers -- Randall
Index: kalumet-modules/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java
===================================================================
--- kalumet-modules/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java	(revision 1646185)
+++ kalumet-modules/console/src/main/java/org/apache/kalumet/console/app/ApplicationsPane.java	(working copy)
@@ -31,6 +31,7 @@
 import nextapp.echo2.app.event.ActionEvent;
 import nextapp.echo2.app.event.ActionListener;
 import nextapp.echo2.app.list.DefaultListModel;
+import nextapp.echo2.app.list.ListModel;
 import org.apache.kalumet.FileManipulator;
 import org.apache.kalumet.console.configuration.ConfigurationManager;
 import org.apache.kalumet.model.Agent;
@@ -277,6 +278,13 @@
     {
         public void actionPerformed( ActionEvent event )
         {
+            ListModel listModel = scopeField.getModel();
+            if ( listModel.size() == 0 )
+            {
+                KalumetConsoleApplication.getApplication().getLogPane().addWarning(
+                        Messages.getString("applicationserver.select"), getEnvironmentWindow().getEnvironmentName());
+                return;
+            }
             KalumetConsoleApplication.getApplication().getDefaultWindow().getContent().add(
                 new ApplicationWindow( ApplicationsPane.this, (String) scopeField.getSelectedItem(), null ) );
         }
Index: kalumet-modules/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties
===================================================================
--- kalumet-modules/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties	(revision 1646185)
+++ kalumet-modules/console/src/main/resources/org/apache/kalumet/console/app/locales/Messages.properties	(working copy)
@@ -42,6 +42,7 @@
 applicationserver										  JEE Application Server
 applicationserver.add									  Add JEE Application Server
 applicationserver.notfound								  JEE Application Server not found.
+applicationserver.select								  Select a JEE Application Server
 applicationserver.startup								  Startup command
 applicationserver.shutdown							      Shutdown command
 apply													  Apply

Reply via email to