Changeset 5687 for trunk/www/views/rawbioassays/edit_rawbioassay.jsp
- Timestamp:
- Aug 9, 2011, 1:39:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/views/rawbioassays/edit_rawbioassay.jsp
r5685 r5687 85 85 boolean deniedPlatform = false; 86 86 Platform currentPlatform = null; 87 Platform defaultPlatform= null;87 List<Platform> defaultPlatforms = null; 88 88 PlatformVariant currentVariant = null; 89 PlatformVariant defaultVariant= null;89 List<PlatformVariant> defaultVariants = null; 90 90 91 91 boolean readCurrentBioAssay = true; … … 95 95 boolean readCurrentProtocol = true; 96 96 Protocol currentProtocol = null; 97 Protocol defaultProtocol= null;97 List<Protocol> defaultProtocols = null; 98 98 boolean readCurrentSoftware = true; 99 99 Software currentSoftware = null; 100 SoftwaredefaultSoftware = null;100 List<Software> defaultSoftware = null; 101 101 boolean readCurrentArrayDesign = true; 102 102 ArrayDesign currentArrayDesign = null; 103 ArrayDesign defaultArrayDesign= null;103 List<ArrayDesign> defaultArrayDesigns = null; 104 104 RawDataType currentRawDataType = null; 105 105 RawDataType defaultRawDataType = null; … … 119 119 try 120 120 { 121 defaultProtocol = (Protocol)activeProject.findDefaultItem(dc,121 defaultProtocols = (List<Protocol>)activeProject.findDefaultItems(dc, 122 122 ItemSubtype.getById(dc, SystemItems.getId(Protocol.FEATURE_EXTRACTION)), false); 123 }124 catch (PermissionDeniedException pdex)125 {126 defaultProtocol = null;127 }128 try129 {130 defaultSoftware = (Software)activeProject.findDefaultItem(dc,131 ItemSubtype.getById(dc, SystemItems.getId(Software.FEATURE_EXTRACTION)), false);132 }133 catch (PermissionDeniedException pdex)134 {135 defaultSoftware = null;136 }137 try138 {139 defaultArrayDesign = (ArrayDesign)activeProject.findDefaultItem(dc, Item.ARRAYDESIGN);140 }141 catch (PermissionDeniedException pdex)142 {143 defaultArrayDesign = null;144 }145 try146 {147 defaultPlatform = (Platform)activeProject.findDefaultItem(dc, Item.PLATFORM);148 123 } 149 124 catch (PermissionDeniedException pdex) … … 151 126 try 152 127 { 153 defaultVariant = (PlatformVariant)activeProject.findDefaultItem(dc, Item.PLATFORMVARIANT); 128 defaultSoftware = (List<Software>)activeProject.findDefaultItems(dc, 129 ItemSubtype.getById(dc, SystemItems.getId(Software.FEATURE_EXTRACTION)), false); 130 } 131 catch (PermissionDeniedException pdex) 132 {} 133 try 134 { 135 defaultArrayDesigns = (List<ArrayDesign>)activeProject.findDefaultItems(dc, Item.ARRAYDESIGN, true); 136 } 137 catch (PermissionDeniedException pdex) 138 {} 139 try 140 { 141 defaultPlatforms = (List<Platform>)activeProject.findDefaultItems(dc, Item.PLATFORM, true); 142 } 143 catch (PermissionDeniedException pdex) 144 {} 145 try 146 { 147 defaultVariants = (List<PlatformVariant>)activeProject.findDefaultItems(dc, Item.PLATFORMVARIANT, true); 154 148 } 155 149 catch (PermissionDeniedException pdex) … … 176 170 catch (Throwable t) 177 171 {} 178 if (currentPlatform == null) currentPlatform = defaultPlatform; 179 if (currentVariant == null) currentVariant = defaultVariant; 172 if (currentPlatform == null && defaultPlatforms.size() > 0) 173 { 174 currentPlatform = defaultPlatforms.get(0); 175 } 176 if (currentVariant == null && defaultVariants.size() > 0) 177 { 178 currentVariant = defaultVariants.get(0); 179 } 180 180 181 181 currentRawDataType = RawDataTypes.getRawDataType(cc.getPropertyValue("rawDataType")); … … 772 772 denied="<%=!readCurrentArrayDesign%>" 773 773 recent="<%=recentArrayDesigns%>" 774 defaultitem ="<%=defaultArrayDesign%>"774 defaultitems="<%=defaultArrayDesigns%>" 775 775 newitem="<%=rawBioAssay == null%>" 776 776 onselect="selectArrayDesignOnClick()" … … 804 804 denied="<%=!readCurrentProtocol%>" 805 805 recent="<%=recentProtocols%>" 806 defaultitem ="<%=defaultProtocol%>"806 defaultitems="<%=defaultProtocols%>" 807 807 newitem="<%=rawBioAssay == null%>" 808 808 onselect="selectProtocolOnClick()" … … 821 821 denied="<%=!readCurrentSoftware%>" 822 822 recent="<%=recentSoftware%>" 823 defaultitem ="<%=defaultSoftware%>"823 defaultitems="<%=defaultSoftware%>" 824 824 newitem="<%=rawBioAssay == null%>" 825 825 onselect="selectSoftwareOnClick()"
Note: See TracChangeset
for help on using the changeset viewer.