Changeset 3923
- Timestamp:
- Oct 29, 2010, 11:07:17 AM (13 years ago)
- Location:
- trunk/client/servlet/src/org/proteios/action
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client/servlet/src/org/proteios/action/directory/ViewActiveDirectory.java
r3917 r3923 105 105 public static final VBoolean VMOVEFILES = new VBoolean("moveFiles", false); 106 106 public static final VBoolean VTABLEUPDATEBUTTONCLICKED = new VBoolean("tableUpdateButtonClicked", false); 107 public static final VInteger VMOVEFILEIDLIST = new VInteger("active.move.file.id.list", 1, false); 107 108 108 109 /** … … 160 161 setSessionAttribute(VMOVEFILES, true); 161 162 setSessionAttribute(ForwardField.VPARAM, MoveFiles.class.getName()); 163 setSessionAttribute(VMOVEFILEIDLIST, tmpFileIds); 162 164 } 163 165 else … … 388 390 dirToolbar.setDefaultAction(al); 389 391 dirToolbar.add(al); 390 /*391 * Moving several files392 */393 log.debug("moveFilesMode = " + moveFilesMode);394 if (moveFilesMode)395 {396 /*397 * This action may be called several times when398 * navigating from the source to the target directory.399 * First time the id values for selected files are400 * stored in the default valid parameter VInteger ItemIdField.VPARAM,401 * otherwise they are stored in valid parameter VInteger ViewActiveFile.VFILEID.402 */403 List<Integer> tmpFileIds = null;404 // Check if first time when navigating to target directory405 if (moveFilesStart)406 {407 tmpFileIds = getValidIntegerList(ItemIdField.VPARAM);408 log.debug("tmpFileIds from ItemIdField.VPARAM = " + tmpFileIds);409 }410 else411 {412 tmpFileIds = getValidIntegerList(ViewActiveFile.VFILEID);413 log.debug("tmpFileIds from ViewActiveFile.VFILEID = " + tmpFileIds);414 }415 log.debug("tmpFileIds = " + tmpFileIds);416 // Add id values for selected files as parameters to action link417 if (tmpFileIds != null && tmpFileIds.size() > 0)418 {419 // Set id values for source files420 for (Integer fileId : tmpFileIds)421 {422 getFormFactory().addHiddenField(dirTable, ViewActiveFile.VFILEID, fileId);423 }424 }425 }426 392 } 427 393 title = new Title(formTitle); … … 793 759 clickAction.addParameter(NextButtonNameField.VPARAM, 794 760 nextButtonName); 795 if (moveFilesMode)796 {797 /*798 * This action may be called several times when799 * navigating from the source to the target directory.800 * First time the id values for selected files are801 * stored in the default valid parameter VInteger ItemIdField.VPARAM,802 * otherwise they are stored in valid parameter VInteger ViewActiveFile.VFILEID.803 */804 List<Integer> tmpFileIds = null;805 // Check if first time when navigating to target directory806 if (moveFilesStart)807 {808 try809 {810 tmpFileIds = getValidIntegerList(ItemIdField.VPARAM);811 }812 catch (Exception e)813 {814 log.debug("Exception when trying to retrieve file id list from ItemIdField.VPARAM: " + e);815 }816 log.debug("tmpFileIds from ItemIdField.VPARAM = " + tmpFileIds);817 }818 else819 {820 try821 {822 tmpFileIds = getValidIntegerList(ViewActiveFile.VFILEID);823 }824 catch (Exception e)825 {826 log.debug("Exception when trying to retrieve file id list from ViewActiveFile.VFILEID: " + e);827 }828 log.debug("tmpFileIds from ViewActiveFile.VFILEID = " + tmpFileIds);829 }830 log.debug("tmpFileIds = " + tmpFileIds);831 // Add id values for selected files as parameters to click action832 if (tmpFileIds != null && tmpFileIds.size() > 0)833 {834 // Set id values for source files835 for (Integer fileId : tmpFileIds)836 {837 clickAction.addParameter(ViewActiveFile.VFILEID, fileId);838 }839 }840 }841 761 } 842 762 else -
trunk/client/servlet/src/org/proteios/action/file/MoveFiles.java
r2893 r3923 59 59 * Verify parameters 60 60 */ 61 List<Integer> fileIds = getValidIntegerList(ViewActiveFile.VFILEID); 61 //List<Integer> fileIds = getValidIntegerList(ViewActiveFile.VFILEID); 62 List<Integer> fileIds = getSessionAttributeList(ViewActiveDirectory.VMOVEFILEIDLIST); 62 63 log.debug("fileIds = " + fileIds); 63 64 /* … … 109 110 setSessionAttribute(ViewActiveDirectory.VSELECTMOVEDIR, false); 110 111 setSessionAttribute(ViewActiveDirectory.VMOVEFILES, false); 112 setSessionAttribute(ViewActiveDirectory.VMOVEFILEIDLIST, null); 111 113 String msg = new String(nFilesMoved + " file[s] moved."); 112 114 log.debug("msg = \"" + msg + "\"");
Note: See TracChangeset
for help on using the changeset viewer.