source: branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/submit.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.0 KB
Line 
1<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
2<%@ page import="net.sf.basedb.core.*"%>
3<%@ page import="net.sf.basedb.clients.web.*"%>
4<%@ page import="net.sf.basedb.util.*"%>
5<%@ page import="uk.ac.ebi.nugo.plugins.*"%>
6<%@ page import="java.lang.reflect.*"%>
7
8
9<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
10<!-- 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 -->
11<jsp:setProperty name="inputDataBean" property="*" />
12
13<html>
14
15<head>
16
17<link rel="stylesheet" type="text/css" href="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/styles.css" />
18<link rel="stylesheet" type="text/css" href="/base/include/styles/main.css">
19<link rel="stylesheet" type="text/css" href="/base/include/styles/size_m.css">
20
21<script type="text/javascript">
22  //submits form
23  function submit()
24  {
25    document.paramValues.submit();
26  }
27</script>
28
29</head>
30
31<body>
32
33<h2>Tab2MAGE Import Wizard -- Summary</h2>
34<p>
35
36Please review the values you have entered and click 'Submit'.
37<p>
38
39<table cellpadding="5" align="center">
40
41  <tr>
42  <td><h3 align="center">Parameter</h3>
43  </td>
44  <td class="input"><h3 align="center">Value</h3>
45  </td>
46  </tr>
47
48<%
49  SessionControl sc = Base.getExistingSessionControl(pageContext, true);
50  String ID = sc.getId();
51  String requestId = request.getParameter("requestId");
52
53  String [] paramNames = new String []{"domain","accession","qualityControl","experimentalDesign",
54    "experimentName","description","releaseDate","submissionDate","submitter","organization",
55    "publicationTitle","authors","journal","volume","issue","pages","year","pubmedId","treatmentProtocol",
56    "extractionProtocol","labelingProtocol","hybridizationProtocol","scanningProtocol",
57    "treatmentProtocolParams","extractionProtocolParams","labelingProtocolParams",
58    "hybridizationProtocolParams","scanningProtocolParams","platform","organism",
59    "numDesigns","dyeSwap","refSample","numTreatmentGroups","expFactors","numReplicates",
60    "tissues","pooling","path","samplePairing","timeCourse","timePoints"};
61   
62    String [] friendlyNames = new String []{"Domain","Accession","Quality Control","Experimental Design",
63    "Experiment Name","Description","Release Date","Submission Date","Submitter","Organization",
64    "Publication Title","Authors","Journal","Volume","Issue","Pages","Year","Pubmed ID","Treatment Protocol",
65    "Extraction Protocol","Labeling Protocol","Hybridization Protocol","Scanning Protocol",
66    "Treatment Protocol Parameters","Extraction Protocol Parameters","Labeling Protocol Parameters",
67    "Hybridization Protocol Parameters","Scanning Protocol Parameters","Platform","Organism",
68    "Number of Array Designs","Dye Swap","Reference Sample","Number of Treatment Groups","Experimental Factors","Number of Replicates per Group",
69    "Tissues","Pooling","Zip File","Sample Pairing Rationale","Time Course","Time Points"};
70
71  //print out all relevant parameter values in the bean
72  Class cls = inputDataBean.getClass();
73  for (int i = 0; i < paramNames.length; i++)
74  {
75    Field field = cls.getDeclaredField(paramNames[i]);
76    String value = (String)field.get(inputDataBean);
77    String fieldName = field.getName();
78   
79    //only print stuff that has a value -- default is empty String initialized in the bean
80    if(!value.equals(""))
81    {
82%>   
83 
84  <tr>
85  <td><b><%=friendlyNames[i] %></b>
86  </td>
87  <td class="input"><%=value %>
88  </td>
89  </tr>
90   
91  <% 
92    }
93  } 
94%>
95
96</table>
97
98<form name="paramValues" id="paramValues" action="<%= request.getContextPath()%>/common/plugin/index.jsp" method="post">
99
100<input type="hidden"name="cmd" value="SetParameters"/>
101<input type="hidden" name="ID" value="<%=ID%>"/> 
102<input type="hidden" name="requestId" value="<%=requestId%>"/> 
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:path" value="<%=inputDataBean.getPath() %>" /> 
143<input type="hidden"name="parameter:subjectNames" value="<%=inputDataBean.getSubjectNames()%>" />
144<input type="hidden"name="parameter:fileList" value="<%=inputDataBean.getFileList()%>" />
145<input type="hidden"name="parameter:subjectList" value="<%=inputDataBean.getSubjectList()%>" />
146<input type="hidden"name="parameter:tissueList" value="<%=inputDataBean.getTissueList()%>" />
147<input type="hidden"name="parameter:dyeList" value="<%=inputDataBean.getDyeList()%>"/>
148<input type="hidden"name="parameter:combinationList" value=""/>
149<input type="hidden"name="parameter:useWizard" value="<%=inputDataBean.getUseWizard()%>" />
150<input type="hidden"name="parameter:legacyData" value="<%=inputDataBean.getLegacyData()%>" />
151<input type="hidden"name="parameter:mappingsMode" value="<%=inputDataBean.getMappingsMode()%>" />
152<input type="hidden"name="parameter:spreadSheetMappings" value="<%= inputDataBean.getSpreadSheetMappings()%>"/>
153<input type="hidden"name="parameter:samplePairing" value="<%= inputDataBean.getSamplePairing()%>"/>
154<input type="hidden"name="parameter:timeCourse" value="<%= inputDataBean.getTimeCourse()%>"/>
155<input type="hidden"name="parameter:timePoints" value="<%= inputDataBean.getTimePoints()%>"/>
156<input type="hidden"name="parameter:proceed" value="<%= inputDataBean.getProceed()%>"/>
157
158
159
160</form>
161
162<p>
163  <table align="center" class="noBorder" cellspacing="5"  cellpadding="5">
164  <tr class="noBorder">
165    <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>
166    <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>
167  </table>
168
169
170</body>
171</html>
172
173
174
Note: See TracBrowser for help on using the repository browser.