Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / SearchStudyAction.java
index e6e8c06ff0a9dfcb1f2492b5916c2c041da83efd..68fcef2a8a7432802ebac92e166912c532936e38 100644 (file)
@@ -44,6 +44,12 @@ public class SearchStudyAction extends SearchBaseAction {
         * Injected user service.
         */
        private UserService _userService;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        /**
         * Serial version ID.
@@ -70,11 +76,18 @@ public class SearchStudyAction extends SearchBaseAction {
                        // Final initialization of the form
                        setCandidates();
                        setContextTypeOptions(getInvolvedContexts());
+                       
+                       setMenuProperty("open");
+                       initializationScreenContext(_menuProperty);
 
                        return SUCCESS;
                } catch (Exception error) {
                        // No need to roll back the transaction as it is read only
                        logger.error("Reason: ", error);
+                       
+                       setMenuProperty("none");
+                       initializationScreenContext(_menuProperty);
+                       
                        return ERROR;
                }
        }
@@ -324,4 +337,20 @@ public class SearchStudyAction extends SearchBaseAction {
        public void setUserService(UserService userService) {
                _userService = userService;
        }
+       
+       /**
+        * 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