]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/ImportDocumentAction.java
Salome HOME
Menus are improved
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / ImportDocumentAction.java
index e03049272e1d8f7e7b20ac8ea8ca6684e2ae01b7..2af91578508cfb1417a4ab441dd8728d81a443dd 100644 (file)
@@ -64,7 +64,12 @@ public class ImportDocumentAction extends UploadBaseNextAction {
        /**
         * Injected repository service.
         */
-       private RepositoryService _repositoryService;
+       private RepositoryService _repositoryService;   
+       /**
+        * Value of the menu property. 
+        * It can be: none, create, open, study, knowledge, sysadmin, help.
+        */
+       private String _menuProperty;
 
        // ==============================================================================================================================
        // Action methods
@@ -75,6 +80,10 @@ public class ImportDocumentAction extends UploadBaseNextAction {
         * @return SUCCESS in success, otherwise - ERROR
         */
        public String doInitialize() {
+               
+               setMenuProperty("study");
+           initializationScreenContext(_menuProperty);
+             
                User user = getConnectedUser();
                File updir = getRepositoryService().getDownloadDirectory(user);
                File upfile = new File(updir.getPath() + "/" + filename);
@@ -171,6 +180,10 @@ public class ImportDocumentAction extends UploadBaseNextAction {
         */
        public String doImport() {
                // -------------------------
+               
+               setMenuProperty("study");
+           initializationScreenContext(_menuProperty);
+           
                if (action == ToDo.cancel)
                        return "cancel";
                if (doctype == 0) {
@@ -442,4 +455,20 @@ public class ImportDocumentAction extends UploadBaseNextAction {
        public void setDocumentTypeService(DocumentTypeService documentTypeService) {
                _documentTypeService = documentTypeService;
        }
+       
+       /**
+        * 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