]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/NewScenarioAction.java
Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / NewScenarioAction.java
index cc1b63406873401cc1facdfda6887d3db3ece397..246cb50deeda25e1ef8ada88718534efde33779b 100644 (file)
@@ -36,6 +36,12 @@ public class NewScenarioAction extends Action {
         */
        private ProjectElementService _projectElementService;
        private Menu _menu;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        /**
         * Serial version ID.
@@ -67,6 +73,10 @@ public class NewScenarioAction extends Action {
       Menu menu = ((NewScenarioMenu)getMenu()).init(study); //RKV
       menu.selects(selection);
       getSession().put("menu.scenario", menu);
+      
+      setMenuProperty("study");
+         initializationScreenContext(_menuProperty);
+               
       return SUCCESS;
     }
 
@@ -81,6 +91,10 @@ public class NewScenarioAction extends Action {
       action    = null;
         
       getMenu("scenario").selects(selection);
+      
+      setMenuProperty("study");
+      initializationScreenContext(_menuProperty);
+      
       return SUCCESS;
     }
 
@@ -125,6 +139,10 @@ public class NewScenarioAction extends Action {
          }
       catch (RuntimeException saverror) {
         logger.error("Reason:", saverror);
+        
+        setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
         return ERROR;
       }
          catch (Exception error) {
@@ -233,4 +251,20 @@ public class NewScenarioAction extends Action {
        public void setScenarioService(ScenarioService scenarioService) {
                _scenarioService = scenarioService;
        }
+       
+       /**
+        * Get the menuProperty.
+        * @return the menuProperty
+        */
+       public String getMenuProperty() {
+               return _menuProperty;
+       }
+
+       /**
+        * Set the menuProperty.
+        * @param menuProperty the menuProperty to set
+        */
+       public void setMenuProperty(String menuProperty) {
+               this._menuProperty = menuProperty;
+       }
 }
\ No newline at end of file