]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java
Salome HOME
New study creation is fixed. Search page is also accessible now.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / DisplayStudyStepAction.java
index 0c7d45f9e98ce522d0e709d504560ea8fa5e3fde..b2d468c878facb70c850d7bfa2448c5da8eb4408 100644 (file)
@@ -7,6 +7,7 @@ import org.hibernate.Transaction;
 import org.splat.dal.dao.som.Database;
 import org.splat.dal.bo.som.ProjectElement;
 import org.splat.dal.bo.som.Scenario;
+import org.splat.service.StudyService;
 import org.splat.som.StepRights;
 import org.splat.dal.bo.som.Study;
 import org.splat.wapp.PopupMenu;
@@ -17,6 +18,8 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
 
        protected OpenStudy   mystudy = null;    // Presented study
 
+       private StudyService _studyService;
+
        private static final long serialVersionUID = 6467920934724352021L;
 
 //  ==============================================================================================================================
@@ -36,7 +39,7 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
           selection = mystudy.getSelection();                   // Current selection
           study     = mystudy.getStudyObject();                 // Current Study object
        } else {                                                // - The selected study is new
-         study     = Database.selectStudy(index);
+         study     = getStudyService().selectStudy(index);
          mystudy   = open(study);
           selection = mystudy.getSelection();                   // Default selection
        }
@@ -50,7 +53,7 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
         study     = mystudy.getStudyObject();
       }
       else {                                                    // Re-opening (refreshing) the currently open study
-           study     = Database.selectStudy(mystudy.getIndex());
+           study     = getStudyService().selectStudy(mystudy.getIndex());
         mystudy   = open(study);                                // Closes the previously open study
         mystudy.setSelection(selection);
       }
@@ -161,4 +164,23 @@ public class DisplayStudyStepAction extends DisplayBaseAction {
 //  -------------------------------
       return String.valueOf(mystudy.isOpenForWriting());
     }
+
+       /**
+        * Get the studyService.
+        * 
+        * @return the studyService
+        */
+       public StudyService getStudyService() {
+               return _studyService;
+       }
+
+       /**
+        * Set the studyService.
+        * 
+        * @param studyService
+        *            the studyService to set
+        */
+       public void setStudyService(StudyService studyService) {
+               _studyService = studyService;
+       }
 }
\ No newline at end of file