source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/userchoice2.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: 4.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//set the value of the zipfile in the bean -- this was chosen on the previous page but the bean does not seem to be picking it up there
16inputDataBean.setPath(request.getParameter("zipFile"));
17
18 %>
19 
20<html>
21<head>
22
23<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
24<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
25<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
26
27<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
28<script language="JavaScript" type="text/javascript">
29
30//submits form
31function submit()
32{
33
34  //set the action value of the form according to what the user chose in the form
35  var form =document.getElementById("dataMode");
36 
37  if(document.getElementById("legacyDataYes").checked)
38  {
39    form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/userchoice3.jsp?ID=<%=ID%>";
40  }
41  if(document.getElementById("legacyDataNo").checked)
42  {
43    var platform = '<%=inputDataBean.getPlatform()%>';
44    var refSample = '<%=inputDataBean.getRefSample()%>';
45    //two channel experiment without reference sample -- we need more info first, go to autogenerate.jsp
46    if((platform != 'Affymetrix') && refSample == 'no')
47    {
48      form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/autogenerate.jsp?ID=<%=ID%>";
49    }
50    //single channel experiments and two channel experiment with reference sample - no extra info needed, proceed straight to submit page
51    else
52    {
53      form.action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/submit.jsp?ID=<%=ID%>";
54    }
55  }
56 
57
58  //submit the form
59  form.submit();
60}
61
62</script>
63
64</head>
65<body>
66
67<h2>Tab2MAGE Import Wizard -- Choose Data Mode</h2>
68<p>
69
70<form name="dataMode" id="dataMode" action="">
71
72<input type="hidden" name="ID" value="<%=ID%>"> 
73<input type="hidden"name="requestId" value="<%=requestId%>"> 
74
75<table cellpadding="10" width="100%">
76  <tr>
77    <td>Are you importing legacy data with pre-existing, named files?</td>
78    <td class="input">
79
80    <table class="noBorder" cellpadding="4">
81      <tr>
82        <td class="noBorder"><input type="radio" id="legacyDataYes" name="legacyData" value="yes"></td>
83        <td class="noBorder">yes</td>
84      </tr>
85
86      <tr>
87        <td class="noBorder"><input type="radio" id="legacyDataNo" name="legacyData" value="no"></td>
88        <td class="noBorder">no</td>
89      </tr>
90    </table>
91
92    </td>
93  </tr>
94</table>
95
96<p>If you choose 'yes' you will be asked for mappings between filenames, samples and factor value combinations on the next pages.
97</p>
98<p>If you choose 'no' the Tab2MAGE importer will autogenerate names for files and samples on your behalf.
99</p>
100
101</form>
102
103  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
104  <tr class="noBorder">
105    <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;">Next</td></tr></table></div></div></td>
106    <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>
107  </table>
108
109
110</body>
111</html>
Note: See TracBrowser for help on using the repository browser.