Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / StudyPropertiesAction.java
index 07e84c455952d61b484f4c01ce3896ba2decd1f9..018497c9e5be133a852a04c7cf0827d00226a1de 100644 (file)
@@ -59,6 +59,12 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
         * Injected user service.
         */
        private UserService _userService;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        /**
         * Save operation type enumeration pointing which section of properties has been edited.
@@ -111,11 +117,16 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
                member = getStudyService().getContributors(study);
                staff = null;
                validor = null;
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
 
-               if (mystudy.isOpenForWriting() && user.canEditProperties())
+               if (mystudy.isOpenForWriting() && user.canEditProperties()) {                   
                        return "edit";
-               else
+               }
+               else {
                        return "display";
+               }
        }
 
        public String doEditTitle() {
@@ -145,6 +156,10 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
                other = null;
 
 //             transax.commit();
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                return SUCCESS;
        }
 
@@ -182,6 +197,10 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
                                i.remove();
                }
 //             transax.commit();
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                return SUCCESS;
        }
 
@@ -225,6 +244,10 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
                        }
                }
 //             transax.commit();
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                return SUCCESS;
        }
 
@@ -302,6 +325,7 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
 //             transax.commit();
 
                doInitialize(); // Re-initialization following the above edition
+               
                return SUCCESS;
        }
 
@@ -471,4 +495,20 @@ public class StudyPropertiesAction extends DisplayStudyStepAction {
        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