[jboss-svn-commits] JBL Code SVN: r10421 - labs/jbossesb/workspace/rsheridan/s360/tools/configeditor/flex/ESBConfigEditor/view.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Mar 21 19:36:24 EDT 2007


Author: rex.sheridan
Date: 2007-03-21 19:36:24 -0400 (Wed, 21 Mar 2007)
New Revision: 10421

Modified:
   labs/jbossesb/workspace/rsheridan/s360/tools/configeditor/flex/ESBConfigEditor/view/ServerPanel.mxml
Log:
UI Updates for allowing multiple deployments.

Modified: labs/jbossesb/workspace/rsheridan/s360/tools/configeditor/flex/ESBConfigEditor/view/ServerPanel.mxml
===================================================================
--- labs/jbossesb/workspace/rsheridan/s360/tools/configeditor/flex/ESBConfigEditor/view/ServerPanel.mxml	2007-03-21 22:32:56 UTC (rev 10420)
+++ labs/jbossesb/workspace/rsheridan/s360/tools/configeditor/flex/ESBConfigEditor/view/ServerPanel.mxml	2007-03-21 23:36:24 UTC (rev 10421)
@@ -3,6 +3,7 @@
 	title="Interact with a JBossESB Server">
 	<mx:Script>
 		<![CDATA[
+			import model.common.ConfigDescriptor;
 			import mx.managers.PopUpManager;
 			import mx.controls.Alert;
 			
@@ -53,17 +54,32 @@
 			protected function saveServerBaseUrl():void {
 				jmodel.serverBaseUrl = ServerBaseUrl.text;
 			}
+			
+			/**
+			 * Saves the server base URL into the model.
+			 */
+			protected function updateSelectedConfig():void {
+				if (Configs.selectedItem != null) {
+					var config:ConfigDescriptor = Configs.selectedItem as ConfigDescriptor;
+					jmodel.selectedConfigName = config.name;
+				}
+			}
 		]]>
 	</mx:Script>
 	<mx:Form width="100%">
 		<mx:FormItem label="Server base URL:" width="100%">
 			<mx:HBox width="100%">
 				<mx:TextInput id="ServerBaseUrl" width="100%" text="{jmodel.serverBaseUrl}"/>
-				<mx:Button label="Apply" click="saveServerBaseUrl();"/>
+				<mx:Button label="Apply" click="saveServerBaseUrl();" width="100"/>
 			</mx:HBox>
 		</mx:FormItem>
-		<mx:FormItem label="Reload configuration from server:">
-			<mx:Button label="Reload Configuration" click="serverManager.startDownload();" width="200"/>
+		<mx:FormItem label="Load configuration from server:" width="100%">
+			<mx:HBox width="100%">
+				<mx:ComboBox id="Configs" dataProvider="{jmodel.configsList}" width="100%" 
+					labelField="name" change="updateSelectedConfig();"/>
+				<mx:Button label="Refresh List" width="150" click="serverManager.startConfigList();"/>
+				<mx:Button label="Load" width="100" click="serverManager.startDownload();"/>
+			</mx:HBox>
 		</mx:FormItem>
 		<mx:FormItem label="Save configuration to server:">
 			<mx:Button label="Save Configuration" click="serverManager.startUpload();" width="200"/>
@@ -82,7 +98,7 @@
 	<mx:HBox width="100%" verticalAlign="middle">
 		<mx:Label text="Action Templates:" fontSize="12"/>
 		<mx:Spacer width="100%"/>
-		<mx:Button label="Refresh" click="templateManager.refresh();"/>
+		<mx:Button label="Refresh" click="templateManager.refresh();" width="100"/>
 	</mx:HBox>
 	<mx:DataGrid width="100%" height="100%" dataProvider="{jmodel.actionTemplates}">
 		<mx:columns>




More information about the jboss-svn-commits mailing list