Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / VersionDocumentAction.java
index 1b02a876e626e75fb7267f229a15f2a054b82046..cd89a60733035822806e61d1a215001600ec8fd4 100644 (file)
@@ -46,6 +46,11 @@ public class VersionDocumentAction extends UploadBaseNextAction {
         * Injected repository service.
         */
        private RepositoryService _repositoryService;
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        /**
         * Serial version ID.
@@ -58,6 +63,10 @@ public class VersionDocumentAction extends UploadBaseNextAction {
 
        public String doInitialize() {
                // -----------------------------
+               
+               setMenuProperty("study");
+           initializationScreenContext(_menuProperty);
+           
                Session connex = Database.getCurSession();
                Transaction transax = connex.beginTransaction();
                User user = getConnectedUser();
@@ -134,6 +143,9 @@ public class VersionDocumentAction extends UploadBaseNextAction {
 
        public String doVersion() {
                // -------------------------
+               setMenuProperty("study");
+           initializationScreenContext(_menuProperty);
+           
                if (action == ToDo.cancel)
                        return "cancel";
 
@@ -370,4 +382,20 @@ public class VersionDocumentAction extends UploadBaseNextAction {
        public void setRepositoryService(RepositoryService repositoryService) {
                _repositoryService = repositoryService;
        }
+       
+       /**
+        * 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