]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/EditKnowledgeElementAction.java
Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditKnowledgeElementAction.java
index c4975d0b225c795601139ca5c08480948681928d..16f48baa66dd6178c4cdb0c7edd50462167eff10 100644 (file)
@@ -43,6 +43,12 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * Injected knowledge element type service.
         */
        private KnowledgeElementTypeService _knowledgeElementTypeService;
+       
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        // ==============================================================================================================================
        // Action methods
@@ -55,6 +61,10 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         */
        public String doInitialize() {
                mystudy = getOpenStudy();
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                return SUCCESS;
        }
 
@@ -64,6 +74,10 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * @return SUCCESS if operation succeeded, ERROR if Runtime exception, otherwise INPUT
         */
        public String doSetKnowledge() {
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
+               
                try {
                        User user = getConnectedUser();
                        mystudy = getOpenStudy();
@@ -117,6 +131,9 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
 
                mystudy.remove(kelm);
                getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of last removed document
+               
+               setMenuProperty("study");
+               initializationScreenContext(_menuProperty);
 
                return SUCCESS;
        }
@@ -233,4 +250,20 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
                        KnowledgeElementTypeService knowledgeElementTypeService) {
                _knowledgeElementTypeService = knowledgeElementTypeService;
        }
+       
+       /**
+        * 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