source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/configureImporter.jsp @ 550

Last change on this file since 550 was 550, checked in by mbayer, 13 years ago

have restructured the code completely that writes the hybs section

File size: 10.4 KB
Line 
1<%@ page import="net.sf.basedb.core.*"%>
2<%@ page import="net.sf.basedb.clients.web.*"%>
3<%@ page import="net.sf.basedb.util.*"%>
4<%@ page import="java.util.*"%>
5
6<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
7<!-- submits the form data back to the bean assuming that each form element is matched to a variable in the bean by the same name -->
8<jsp:setProperty name="inputDataBean" property="*" />
9
10<%
11final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
12final String ID = sc.getId();
13final String requestId = request.getParameter("requestId");
14
15
16  //we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
17  ItemContext cc = sc.getCurrentContext(Item.EXPERIMENT);
18  int experimentId = cc.getId();
19
20 %>
21
22
23<html>
24
25<head>
26
27<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
28<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
29<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
30
31<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
32
33<script language="JavaScript" type="text/javascript">
34  //submits form
35  function submit()
36  {
37    document.hybridizations.submit();
38  }
39    function getRoot()
40    {
41      return '/base/';
42    }
43    function getScale()
44    {
45      return 1.0;
46    }
47    function doImport()
48    {
49      var frm = document.forms['hybridizations'];
50      if (Main.trimString(frm.path.value) == '')
51      {
52        alert("You must select a file to import from");
53        frm.path.focus();
54      }
55      else
56      {
57        frm.submit();
58      }
59    }
60    function browseOnClick()
61    {
62      var frm = document.forms['hybridizations'];
63      var url = '<%= request.getContextPath()%>/filemanager/index.jsp?ID=<%=ID%>&cmd=SelectOne&title=Select+file+to+import&callback=setFileCallback';
64      url += '&filter:INT:location=1';
65      Main.openPopup(url, 'SelectFile', 1000, 700);
66    }
67    function setFileCallback(fileId, path)
68    {
69      var frm = document.forms['hybridizations'];
70      frm.file_id.value = fileId;
71      frm.path.value = path;
72      document.getElementById('zipFile').value = path;
73      }
74    function recentFileOnChange()
75    {
76      var frm = document.forms['hybridizations'];
77      var selected = frm.recentFile[frm.recentFile.selectedIndex];
78      setFileCallback(selected.value, selected.text);
79      frm.recentFile.selectedIndex = 0;
80    }
81
82   
83    </script>
84
85</head>
86
87<body>
88
89
90
91
92
93<form name="hybridizations"action="<%= request.getContextPath()%>/common/plugin/index.jsp?ID=<%=ID%>" method="post">
94<input type="hidden" name="ID" value="<%=ID%>"> 
95<input type="hidden" name="cmd" value="SetParameters"> 
96<input type="hidden"name="requestId" value="<%=requestId%>"> 
97
98<input type="hidden" name="file_id" value="">
99<input type="hidden" name="parameter:path" value=""  id="zipFile">
100<input type="hidden" name="parameter:experimentId" value="<%=experimentId %>"  id="experimentId">
101
102
103<input type="hidden"name="parameter:domain" value="<%=inputDataBean.getDomain()%>" />
104<input type="hidden"name="parameter:accession" value="<%=inputDataBean.getAccession()%>" />
105<input type="hidden"name="parameter:qualityControl" value="<%=inputDataBean.getQualityControl()%>" />
106<input type="hidden"name="parameter:experimentalDesign" value="<%=inputDataBean.getExperimentalDesign()%>" />
107<input type="hidden"name="parameter:experimentName" value="<%=inputDataBean.getExperimentName()%>" />
108<input type="hidden"name="parameter:description" value="<%=inputDataBean.getDescription()%>" />
109<input type="hidden"name="parameter:releaseDate" value="<%=inputDataBean.getReleaseDate()%>" />
110<input type="hidden"name="parameter:submissionDate" value="<%=inputDataBean.getSubmissionDate()%>" />
111<input type="hidden"name="parameter:submitter" value="<%=inputDataBean.getSubmitter()%>" />
112<input type="hidden"name="parameter:organization" value="<%=inputDataBean.getOrganization()%>" />
113<input type="hidden"name="parameter:publicationTitle" value="<%=inputDataBean.getPublicationTitle()%>" />
114<input type="hidden"name="parameter:authors" value="<%=inputDataBean.getAuthors()%>" />
115<input type="hidden"name="parameter:journal" value="<%=inputDataBean.getJournal()%>" />
116<input type="hidden"name="parameter:volume" value="<%=inputDataBean.getVolume()%>" />
117<input type="hidden"name="parameter:issue" value="<%=inputDataBean.getIssue()%>" />
118<input type="hidden"name="parameter:pages" value="<%=inputDataBean.getPages()%>" />
119<input type="hidden"name="parameter:year" value="<%=inputDataBean.getYear()%>" />
120<input type="hidden"name="parameter:pubmedId" value="<%=inputDataBean.getPubmedId()%>" />
121<input type="hidden"name="parameter:experimentId" value="<%=inputDataBean.getExperimentId()%>" />
122<input type="hidden"name="parameter:treatmentProtocol" value="<%=inputDataBean.getTreatmentProtocol()%>" />
123<input type="hidden"name="parameter:extractionProtocol" value="<%=inputDataBean.getExtractionProtocol()%>" />
124<input type="hidden"name="parameter:labelingProtocol" value="<%=inputDataBean.getLabelingProtocol()%>" />
125<input type="hidden"name="parameter:hybridizationProtocol" value="<%=inputDataBean.getHybridizationProtocol()%>" />
126<input type="hidden"name="parameter:scanningProtocol" value="<%=inputDataBean.getScanningProtocol()%>" />
127<input type="hidden"name="parameter:treatmentProtocolParams" value="<%=inputDataBean.getTreatmentProtocolParams()%>" />
128<input type="hidden"name="parameter:extractionProtocolParams" value="<%=inputDataBean.getExtractionProtocolParams()%>" />
129<input type="hidden"name="parameter:labelingProtocolParams" value="<%=inputDataBean.getLabelingProtocolParams()%>" />
130<input type="hidden"name="parameter:hybridizationProtocolParams" value="<%=inputDataBean.getHybridizationProtocolParams()%>" />
131<input type="hidden"name="parameter:scanningProtocolParams" value="<%=inputDataBean.getScanningProtocolParams()%>" />
132<input type="hidden"name="parameter:platform" value="<%=inputDataBean.getPlatform()%>" />
133<input type="hidden"name="parameter:organism" value="<%=inputDataBean.getOrganism()%>" />
134<input type="hidden"name="parameter:numDesigns" value="<%=inputDataBean.getNumDesigns()%>" />
135<input type="hidden"name="parameter:dyeSwap" value="<%=inputDataBean.getDyeSwap()%>" />
136<input type="hidden"name="parameter:refSample" value="<%=inputDataBean.getRefSample()%>" />
137<input type="hidden"name="parameter:numTreatmentGroups" value="<%=inputDataBean.getNumTreatmentGroups()%>" />
138<input type="hidden"name="parameter:expFactors" value="<%=inputDataBean.getExpFactors()%>" />
139<input type="hidden"name="parameter:numReplicates" value="<%=inputDataBean.getNumReplicates()%>" />
140<input type="hidden"name="parameter:tissues" value="<%=inputDataBean.getTissues()%>" />
141<input type="hidden"name="parameter:pooling" value="<%=inputDataBean.getPooling()%>" />
142<input type="hidden"name="parameter:subjectNames" value="<%=inputDataBean.getSubjectNames()%>" />
143<input type="hidden"name="parameter:fileList" value="<%=inputDataBean.getFileList()%>" />
144<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
145<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
146<input type="hidden"name="parameter:combinationList" value=""/>
147<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
148<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
149<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
150<input type="hidden"name="parameter:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
151<input type="hidden"name="parameter:samplePairing" value="<%= inputDataBean.getSamplePairing()%>"/>
152<input type="hidden"name="parameter:timeCourse" value="<%= inputDataBean.getTimeCourse()%>"/>
153<input type="hidden"name="parameter:timePoints" value="<%= inputDataBean.getTimePoints()%>"/>
154<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
155
156
157
158
159
160<h2>Tab2MAGE Import Wizard -- Select Your Data File</h2>
161
162<p>
163<!--  table with the input form -->
164<table cellpadding="15">
165
166  <!-- file upload -->
167  <tr>
168    <td class="boldText">File:</td>
169
170    <td class="input">
171    <table class="noBorder" border="0" cellspacing="0" cellpadding="5">
172      <tr class="noBorder" >
173     
174        <td style="vertical-align: middle;border-style: none;"><input type="text" name="path" size="35" value=""></td>
175       
176        <td  style="vertical-align: middle;border-style: none;">
177        <div class="buttons"
178          onmouseover="this.className='buttons_hover';"
179          onmouseout="this.className='buttons';"
180          onclick="browseOnClick()">
181        <div class="buttons_inner">
182
183        <table class="noBorder" cellspacing="0" cellpadding="0">
184          <tr class="noBorder">
185            <td style="border-style: none;">&nbsp;&nbsp;<img src="/base/images/browse.png" border="0"></td>
186            <td style="border-style: none;">Browse&hellip;</td>
187          </tr>
188        </table>
189
190        </div>
191        </div>
192        </td>
193       
194      </tr>
195    </table>
196    </td>
197
198    <td>Please select the zip file on your local disk that contains the data files for import.
199   All files must be of the same data format (e.g. Genepix or Affymetrix etc.).
200   <p>
201   The file must include a Tab2MAGE file relating to your raw data files and this must be named "tab2mage.txt".
202   </td>
203  </tr>
204
205</table>
206
207<p>
208
209  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
210  <tr class="noBorder">
211    <td id="next" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="submit()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/gonext.gif" border="0"></td><td style="border-style: none;">Submit</td></tr></table></div></div></td>
212    <td id="close" width="50%" style="border-style: none;"><div class="buttons" onmouseover="this.className='buttons_hover';" onmouseout="this.className='buttons';" onclick="window.close()"><div class="buttons_inner"><table  class="noBorder" cellspacing="0" cellpadding="0"><tr  class="noBorder"><td style="border-style: none;"><img src="/base/images/cancel.gif" border="0"></td><td style="border-style: none;">Cancel</td></tr></table></div></div></td>  </tr>
213  </table>
214
215
216</form>
217
218</body>
219</html>
Note: See TracBrowser for help on using the repository browser.