Salome HOME
Update uses list functionality
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / ImportDocumentAction.java
index 3381631ca28d9e9789ab9663e79ad328e5c8716b..ed307e2ce165b5d59030d58c0df6e3de9a8c0312 100644 (file)
@@ -59,6 +59,21 @@ public class ImportDocumentAction extends BaseUploadDocumentAction {
         */
        private DocumentTypeService _documentTypeService;
 
+       /**
+        * Update uses documents list if chosen new type of import document.
+        * @return SUCCESS
+        */
+       public final  String updateUsesList() {
+               _mystudy = getOpenStudy();
+               _defuses = new ArrayList<Document>();
+               _deftype = getDocumentTypeService().selectType(
+                               (int) _documentType);
+               if (_deftype != null) {
+                       setupDefaultUses(_deftype);
+               }
+               return SUCCESS;
+       }
+
        /**
         * Initialize the operation.
         * 
@@ -446,4 +461,4 @@ public class ImportDocumentAction extends BaseUploadDocumentAction {
        public List<Boolean> getReviewable() {
                return _reviewable;
        }
-}
\ No newline at end of file
+}