Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/Messages.properties
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/Messages.properties	(revision 389)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/pl_PL/Messages.properties	(revision 389)
@@ -0,0 +1,2 @@
+# locale/pl_PL/Messages.properties
+
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/Messages.properties
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/Messages.properties	(revision 389)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/locale/en_US/Messages.properties	(revision 389)
@@ -0,0 +1,2 @@
+# locale/en_US/Messages.properties
+ExperimentSubmitted=Experiment was succesfully submitted.
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudio.mxml
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudio.mxml	(revision 377)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudio.mxml	(revision 389)
@@ -30,4 +30,7 @@
 			import gssim.gssimstudio.editor.gssim.skins.IconButtonSkin;
 			
+			import mx.controls.Alert;
+			import mx.rpc.events.ResultEvent;
+			
 			public var isFileTransfering : Boolean = false;
 			
@@ -48,4 +51,5 @@
 				
 				addModelUpdatedResultCallback(archiveViewer.convertToXml);
+				addModelUpdatedResultCallback(printMessage);
 			}
 				
@@ -64,5 +68,10 @@
 				//refresh editors
 				if (workloadEditor != null && workloadEditor.ErrorList != null) workloadEditor.ErrorList.invalidateList();
-			} 			
+			} 	
+			
+			private function printMessage(event:ResultEvent):void{
+				if (model.messageCode == null || model.messageCode == "") return;
+				Alert.show(resourceManager.getString('Messages', model.messageCode));
+			}
 		]]>
 	</fx:Script>
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/views/ArchiveViewer.mxml
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/views/ArchiveViewer.mxml	(revision 63)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/views/ArchiveViewer.mxml	(revision 389)
@@ -144,5 +144,4 @@
 				if (parentApplication.gsSimStudioModel.experimentListChanged == true)
 				{
-					parentApplication.gsSimStudioModel.experimentListChanged = false;
 					var temp : XML = <experiments />;
 					for each (var exp2 : Object in parentApplication.gsSimStudioModel.experimentList)
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudioModel.as
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudioModel.as	(revision 81)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/app/gssim/gssimstudio/editor/GSSimStudioModel.as	(revision 389)
@@ -24,4 +24,5 @@
 		
 		public var openUrl : String;
+		public var messageCode : String;
 		
 		/* Hashmap used to load multiple experiments configurations from Archive into Experiment Editor. */
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java	(revision 375)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudio.java	(revision 389)
@@ -121,7 +121,14 @@
     private ServiceLog log = ServiceLog.getInstance(GSSimStudio.class);
     
+    private GSSimStudioModel getModel() {
+    	GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+    	model.setMessageCode(null);
+    	model.setExperimentListChanged(false);
+    	return model;
+    }
+    
     @BlazeDsMethod()
     public GSSimStudioModel getOpenURL(String fileUrl) throws MalformedURLException {
-    	GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+    	GSSimStudioModel model = getModel();
         FileLocation fileLocation = new FileLocation(fileUrl);
         ServletContext servletContext = FlexContext.getServletContext();
@@ -209,15 +216,15 @@
 			
 		} catch (SQLException e) {
-			log.error(e.toString());
-		} catch (InstantiationException e) {
-			log.error(e.toString());
-		} catch (IllegalAccessException e) {
-			log.error(e.toString());
-		} catch (ClassNotFoundException e) {
-			log.error(e.toString());
-		} catch (Exception e) {
-			log.error(e.toString());
-		} finally {
-			closeConnection(connection, null);
+			setSqlError("Submit experiment", model, e);
+		} catch (InstantiationException e) {
+			setDbConnectionError(model, e);		
+		} catch (IllegalAccessException e) {
+			setDbConnectionError(model, e);	
+		} catch (ClassNotFoundException e) {
+			setDbConnectionError(model, e);	
+		} catch (Exception e) {
+			setError("Unexpected error occured", model, e);	
+		} finally {
+			closeConnection(connection, model);
 		}
 		
@@ -234,6 +241,8 @@
 			Runtime.getRuntime().exec(cmd).waitFor();
 		} catch (Exception e) {
-			log.error(e.toString());
-		}
+			setError("Unexpected error", model, e);
+		}
+		
+		model.setMessageCode("ExperimentSubmitted");
 		
 		return (GSSimStudioModel) VineFlexUtilClass.getUIModel();
@@ -320,7 +329,5 @@
 	public GSSimStudioModel getAllocationsFromDb(Integer taskId, Integer unitId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		
@@ -356,7 +363,5 @@
 	public GSSimStudioModel getAllocationDetailsFromDb(Integer allocationId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -392,7 +397,5 @@
 	public GSSimStudioModel getBlobPropertiesFromDb(Integer configId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -435,5 +438,5 @@
 	public GSSimStudioModel getResourceTimelineFromDb(String resourceName, Integer expId, String type) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+		GSSimStudioModel model = getModel();
 		
 		Connection connection = null;
@@ -492,7 +495,5 @@
 	public GSSimStudioModel getExperimentConfiguration(List experiments) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		
 		Connection connection = null;
@@ -547,5 +548,5 @@
 	protected int addExperimentToDb(String expName, String metaexperiment) {
 		Connection connection = null;
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+		GSSimStudioModel model = getModel();
 		try {
 			connection = factory().createDBConnection(dbAddress, dbUser,
@@ -672,7 +673,5 @@
 	@BlazeDsMethod()
 	public GSSimStudioModel deleteExperiment(Integer PK) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -704,7 +703,5 @@
 	@BlazeDsMethod()
 	public GSSimStudioModel updateExperiment(Integer PK, Integer userID, Integer configID, String name, Timestamp commissionDate, String description, String status, Integer metaexpID) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -737,7 +734,5 @@
 	@BlazeDsMethod()
 	public GSSimStudioModel changeExperimentsMetaexperiment(List experiments, String metaexperiment) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -777,7 +772,5 @@
 	@BlazeDsMethod()
 	public GSSimStudioModel getExperimentNetworkTopology(Integer PK) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -829,5 +822,5 @@
 			Boolean publish, String status) {
 
-		if (model == null) model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+		if (model == null) model = getModel();
 		Connection connection = null;
 		try {
@@ -866,7 +859,5 @@
 	public GSSimStudioModel getExperimentStatsFromDb(Integer experimentId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -899,7 +890,5 @@
 	@BlazeDsMethod()
 	public GSSimStudioModel getExtendedConfigurationFromDb(int id) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -965,7 +954,5 @@
 	public GSSimStudioModel getQueuesFromDb(Integer resourceId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1000,7 +987,5 @@
 	public GSSimStudioModel getReservationsFromDb(Integer taskId, Integer unitId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1035,7 +1020,5 @@
 	public GSSimStudioModel getReservationDetailsFromDb(Integer reservationId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1097,6 +1080,5 @@
 	
 	protected GSSimStudioModel delegateResource(Object[] parameters, Integer index) {
-		GSSimStudioModel gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		gssimStudioModel.setExperimentListChanged(false);
+		GSSimStudioModel gssimStudioModel = getModel();
         ResourceChartModel resourceChartModel = (ResourceChartModel) gssimStudioModel.getResourceChartComponents().get(index.toString());
         if (resourceChartModel == null)
@@ -1120,6 +1102,5 @@
 
 	protected GSSimStudioModel delegateComparison(Object[] parameters, Integer index) {
-		GSSimStudioModel gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		gssimStudioModel.setExperimentListChanged(false);
+		GSSimStudioModel gssimStudioModel = getModel();
 		ExperimentComparisonChartModel experimentComparisonChartModel = (ExperimentComparisonChartModel) gssimStudioModel.getComparisonComponents().get(index.toString());
         if (experimentComparisonChartModel == null)
@@ -1138,6 +1119,5 @@
 	
 	protected GSSimStudioModel delegateGannt(Object[] parameters, Integer index) {
-		GSSimStudioModel gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		gssimStudioModel.setExperimentListChanged(false);
+		GSSimStudioModel gssimStudioModel = getModel();
         GanntChartModel ganntChartModel = (GanntChartModel) gssimStudioModel.getGanntChartComponents().get(index.toString());
         if (ganntChartModel == null)
@@ -1154,7 +1134,5 @@
 			Integer jobId, Integer taskId, Integer procSetId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1219,7 +1197,5 @@
 			Long maxExecutionFinishDateMilis) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1289,7 +1265,5 @@
 	public GSSimStudioModel getTextPropertiesFromDb(Integer configId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1325,7 +1299,5 @@
 			String type) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1361,7 +1333,5 @@
 			Long minTimestampMilis, Long maxTimestampMilis) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1403,7 +1373,5 @@
 	public GSSimStudioModel getUnitDetailsFromDb(Integer unitId) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1440,7 +1408,5 @@
 			Long minTimestampMilis, Long maxTimestampMilis) {
 
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-		//avoid updating experiment list in archive when nothing changed
-		model.setExperimentListChanged(false);
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1480,5 +1446,5 @@
 
 	public GSSimStudioModel getUser(int id) {
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+		GSSimStudioModel model = getModel();
 		Connection connection = null;
 		try {
@@ -1586,8 +1552,7 @@
 		log.debug(jobDescription);
 		
-		GSSimStudioModel model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+		GSSimStudioModel model = getModel();
 		model.setGrmsDN(grmsDN);
 		model.setGrmsURL(grmsURL);
-		//avoid updating experiment list in archive when nothing changed
 		model.setExperimentListChanged(true);
 
@@ -1624,5 +1589,5 @@
 			int jobCount) {
 		if (model == null) {
-			model = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+			model = (GSSimStudioModel) getModel();
 		}
 		GRMS3ReturnType grms3ReturnType = null;
@@ -1723,9 +1688,7 @@
         log.debug("FILELISTCOM all files uploaded");
 
-        GSSimStudioModel fileListComModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
+        GSSimStudioModel fileListComModel = getModel();
         Vector<FileItem> uploadedFiles = VineFlexUtilClass.getUploadedFiles();
-        //avoid updating experiment list in archive when nothing changed
-        fileListComModel.setExperimentListChanged(false);
-
+        
         int numOfFiles = uploadedFiles.size();
         System.out.println("FILELISTCOM all files uploaded");
@@ -1851,7 +1814,5 @@
         log.debug("FILELISTCOM all files uploaded");
 
-        GSSimStudioModel fileListComModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-        //avoid updating experiment list in archive when nothing changed
-		fileListComModel.setExperimentListChanged(false);
+        GSSimStudioModel fileListComModel = getModel();
         Vector<FileItem> uploadedFiles = new Vector<FileItem>();
 		File rootDir = new File(System.getProperty("java.io.tmpdir"));
@@ -2148,7 +2109,5 @@
         log.debug("deleteFileItem");
 
-        GSSimStudioModel fileListComModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-        //avoid updating experiment list in archive when nothing changed
-		fileListComModel.setExperimentListChanged(false);
+        GSSimStudioModel fileListComModel = getModel();
 
         try {
@@ -2206,7 +2165,5 @@
     public Object init(Object model) {
         log.debug("init() called");
-		GSSimStudioModel gssimStudioModel = (GSSimStudioModel) model;
-		//avoid updating experiment list in archive when nothing changed
-		gssimStudioModel.setExperimentListChanged(false);
+		GSSimStudioModel gssimStudioModel = getModel();
 		if (gssimStudioModel == null)
 			gssimStudioModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
@@ -2332,8 +2289,5 @@
         ServiceContext serviceContext = VineFlexUtilClass.getServiceContext();
 
-        GSSimStudioModel fileListComModel = (GSSimStudioModel) VineFlexUtilClass.getUIModel();
-
-        //avoid updating experiment list in archive when nothing changed
-		fileListComModel.setExperimentListChanged(false);
+        GSSimStudioModel fileListComModel = getModel();
         
         FileResourceManager fileResourceManager = getFileResourceManager(serviceContext);
Index: gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudioModel.java
===================================================================
--- gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudioModel.java	(revision 81)
+++ gssim_ui/branches/vine/gssimstudio/src/web/ui/flex/java/gssim/gssimstudio/flex/app/editor/GSSimStudioModel.java	(revision 389)
@@ -132,16 +132,20 @@
 	/* END OF DB DATA */
 
+	private String messageCode;
+	
+	public String getMessageCode() {
+		return messageCode;
+	}
+
+	public void setMessageCode(String messageCode) {
+		this.messageCode = messageCode;
+	}
+	
 	private String openUrl;
 	
-	/**
-	 * @return the grmsDN
-	 */
 	public String getOpenUrl() {
 		return openUrl;
 	}
 
-	/**
-	 * @param grmsDN the grmsDN to set
-	 */
 	public void setOpenUrl(String openUrl) {
 		this.openUrl = openUrl;
