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 | <%@ page import="java.lang.*"%> |
---|
6 | |
---|
7 | <jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="application" /> |
---|
8 | <!-- 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 --> |
---|
9 | <jsp:setProperty name="inputDataBean" property="*" /> |
---|
10 | |
---|
11 | |
---|
12 | <html> |
---|
13 | |
---|
14 | <head> |
---|
15 | |
---|
16 | <link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" /> |
---|
17 | <link rel="stylesheet" type="text/css" href="/base/include/styles/main.css"> |
---|
18 | <link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css"> |
---|
19 | |
---|
20 | <script language="JavaScript" type="text/javascript"> |
---|
21 | //submits form |
---|
22 | function submit() |
---|
23 | { |
---|
24 | document.protocols.submit(); |
---|
25 | } |
---|
26 | </script> |
---|
27 | |
---|
28 | </head> |
---|
29 | |
---|
30 | <body> |
---|
31 | |
---|
32 | |
---|
33 | <% |
---|
34 | final SessionControl sc = Base.getExistingSessionControl(pageContext, true); |
---|
35 | final String ID = sc.getId(); |
---|
36 | final String requestID = request.getParameter("requestId"); |
---|
37 | |
---|
38 | |
---|
39 | //here we also need to deal with the multiple select inputs from the previous page |
---|
40 | //their selected values need to be extracted from the request and concatenated into a single String |
---|
41 | |
---|
42 | //first deal with quality control input |
---|
43 | String[] items = request.getParameterValues("qualityControl"); |
---|
44 | StringBuilder qualControl = new StringBuilder(); |
---|
45 | for(int i = 0; i< items.length; i++) |
---|
46 | { |
---|
47 | qualControl.append(items[i] ); |
---|
48 | //last one does not get a comma |
---|
49 | if(i!=items.length-1) |
---|
50 | { |
---|
51 | qualControl.append(","); |
---|
52 | } |
---|
53 | } |
---|
54 | //store this in the bean |
---|
55 | inputDataBean.setQualityControl(qualControl.toString()); |
---|
56 | |
---|
57 | //next deal with the experiment design type |
---|
58 | //this is slightly more complex as we are dealing with six separate list boxes and we need to combine all their inputs |
---|
59 | StringBuilder experimentalDesign = new StringBuilder(); |
---|
60 | |
---|
61 | String [] biologicalPropertyItems = request.getParameterValues("biologicalProperty"); |
---|
62 | if(biologicalPropertyItems !=null) |
---|
63 | { |
---|
64 | for(int i = 0; i< biologicalPropertyItems.length; i++) |
---|
65 | { |
---|
66 | experimentalDesign.append(biologicalPropertyItems[i] +","); |
---|
67 | } |
---|
68 | } |
---|
69 | |
---|
70 | String [] bioMolecularAnnotationItems = request.getParameterValues("bioMolecularAnnotation"); |
---|
71 | if(bioMolecularAnnotationItems !=null) |
---|
72 | { |
---|
73 | for(int i = 0; i<bioMolecularAnnotationItems.length; i++) |
---|
74 | { |
---|
75 | experimentalDesign.append(bioMolecularAnnotationItems[i] +","); |
---|
76 | } |
---|
77 | } |
---|
78 | |
---|
79 | String [] epidemiologicalDesignItems = request.getParameterValues("epidemiologicalDesign"); |
---|
80 | if(epidemiologicalDesignItems !=null) |
---|
81 | { |
---|
82 | for(int i = 0; i< epidemiologicalDesignItems.length; i++) |
---|
83 | { |
---|
84 | experimentalDesign.append(epidemiologicalDesignItems[i] +","); |
---|
85 | } |
---|
86 | } |
---|
87 | |
---|
88 | String [] methodologicalDesignItems = request.getParameterValues("methodologicalDesign"); |
---|
89 | if(methodologicalDesignItems !=null) |
---|
90 | { |
---|
91 | for(int i = 0; i< methodologicalDesignItems.length; i++) |
---|
92 | { |
---|
93 | experimentalDesign.append(methodologicalDesignItems[i] +","); |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|
97 | String [] perturbationalDesignItems = request.getParameterValues("perturbationalDesign"); |
---|
98 | if(perturbationalDesignItems !=null) |
---|
99 | { |
---|
100 | for(int i = 0; i< perturbationalDesignItems.length; i++) |
---|
101 | { |
---|
102 | experimentalDesign.append(perturbationalDesignItems[i] +","); |
---|
103 | } |
---|
104 | } |
---|
105 | |
---|
106 | String [] technologicalDesignItems = request.getParameterValues("technologicalDesign"); |
---|
107 | if(technologicalDesignItems !=null) |
---|
108 | { |
---|
109 | for(int i = 0; i< technologicalDesignItems.length; i++) |
---|
110 | { |
---|
111 | experimentalDesign.append(technologicalDesignItems[i]+","); |
---|
112 | } |
---|
113 | } |
---|
114 | |
---|
115 | //store the combined String in the bean |
---|
116 | inputDataBean.setExperimentalDesign(experimentalDesign.toString()); |
---|
117 | |
---|
118 | %> |
---|
119 | |
---|
120 | <form name="protocols" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/hybridizations.jsp" method="post"> |
---|
121 | <input type="hidden" name="ID" value="<%=ID%>"> |
---|
122 | |
---|
123 | <h1>Tab2MAGE Importer -- Your Protocols</h1> |
---|
124 | Page 2 of 4 |
---|
125 | <p> |
---|
126 | <table cellpadding="10"> |
---|
127 | |
---|
128 | <tr> |
---|
129 | <td class="header"> |
---|
130 | <h3>Protocol name</h3> |
---|
131 | </td> |
---|
132 | <td class="header"> |
---|
133 | <h3>Protocol Text</h3> |
---|
134 | <p>The full text of the protocol. |
---|
135 | </td> |
---|
136 | <td class="header"> |
---|
137 | <h3>Parameters</h3> |
---|
138 | <p>A list of parameters for this protocol, separated by semicolons, in the format 'name(units)'. |
---|
139 | Each parameter name must be unique within this form.<br /><br /> |
---|
140 | Leave blank if the protocol is unparameterized.</p> |
---|
141 | </td> |
---|
142 | </tr> |
---|
143 | |
---|
144 | <tr> |
---|
145 | <td class="boldText">Treatment</td> |
---|
146 | <td class="input"><textarea rows="8" cols="35" name="treatmentProtocol">my treatment protocol text </textarea></td> |
---|
147 | <td class="input_topaligned"><textarea rows="3" cols="35" name="treatmentProtocolParams">param1</textarea></td> |
---|
148 | </tr> |
---|
149 | |
---|
150 | <tr> |
---|
151 | <td class="boldText">Extraction</td> |
---|
152 | <td class="input"><textarea rows="8" cols="35" name="extractionProtocol"> my extraction protocol text </textarea></td> |
---|
153 | <td class="input_topaligned"><textarea rows="3" cols="35" name="extractionProtocolParams">param2</textarea></td> |
---|
154 | </tr> |
---|
155 | |
---|
156 | <tr> |
---|
157 | <td class="boldText">Labeling</td> |
---|
158 | <td class="input"><textarea rows="8" cols="35" name="labelingProtocol"> my labeling protocol text </textarea></td> |
---|
159 | <td class="input_topaligned"><textarea rows="3" cols="35" name="labelingProtocolParams">param3</textarea></td> |
---|
160 | </tr> |
---|
161 | |
---|
162 | <tr> |
---|
163 | <td class="boldText">Hybridization</td> |
---|
164 | <td class="input"><textarea rows="8" cols="35" name="hybridizationProtocol">my hybs protocol text </textarea></td> |
---|
165 | <td class="input_topaligned"><textarea rows="3" cols="35" name="hybridizationProtocolParams">param4</textarea></td> |
---|
166 | </tr> |
---|
167 | |
---|
168 | <tr> |
---|
169 | <td class="boldText">Scanning</td> |
---|
170 | <td class="input"><textarea rows="8" cols="35"name="scanningProtocol"> my scanning protocol text </textarea></td> |
---|
171 | <td class="input_topaligned"><textarea rows="3" cols="35" name="scanningProtocolParams"> param5</textarea></td> |
---|
172 | </tr> |
---|
173 | |
---|
174 | </table> |
---|
175 | |
---|
176 | <p> |
---|
177 | <table align="center" class="noBorder" cellspacing="5" cellpadding="5"> |
---|
178 | <tr class="noBorder"> |
---|
179 | <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> |
---|
180 | <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> |
---|
181 | </table> |
---|
182 | |
---|
183 | </form> |
---|
184 | |
---|
185 | </body> |
---|
186 | </html> |
---|
187 | |
---|