Ignore:
Timestamp:
Dec 4, 2007, 3:46:31 PM (14 years ago)
Author:
mbayer
Message:
  • have tied the interface to the importer plugin class now -- all parameters get picked up fine by the plugin
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp

    r511 r512  
    33<%@ page import="net.sf.basedb.util.*"%>
    44<%@ page import="java.util.*"%>
     5<%@ page import="java.lang.*"%>
    56
    67<jsp:useBean id="inputDataBean" class="uk.ac.ebi.nugo.plugins.DataBean" scope="session" />
     
    2021final String ID = sc.getId();
    2122final String requestID = request.getParameter("requestId");
     23
     24
     25//here we also need to deal with the multiple select inputs from the previous page
     26//their selected values need to be extracted from the request and concatenated into a single String
     27
     28//first deal with quality control input
     29String[] items = request.getParameterValues("qualityControl");
     30StringBuilder qualControl = new StringBuilder();
     31for(int i = 0; i< items.length; i++)
     32{
     33    qualControl.append(items[i] );
     34    //last one does not get a comma
     35    if(i!=items.length-1)
     36    {
     37    qualControl.append(",");
     38    }
     39}
     40//store this in the bean
     41inputDataBean.setQualityControl(qualControl.toString());
     42
     43//next deal with the experiment design type
     44//this is slightly more complex as we are dealing with six separate list boxes and we need to combine all their inputs
     45StringBuilder experimentalDesign = new StringBuilder();
     46
     47String [] biologicalPropertyItems = request.getParameterValues("biologicalProperty");
     48if(biologicalPropertyItems !=null)
     49{
     50  for(int i = 0; i< biologicalPropertyItems.length; i++)
     51  {
     52    experimentalDesign.append(biologicalPropertyItems[i] +",");
     53  }
     54}
     55
     56String [] bioMolecularAnnotationItems = request.getParameterValues("bioMolecularAnnotation");
     57if(bioMolecularAnnotationItems !=null)
     58{
     59  for(int i = 0; i<bioMolecularAnnotationItems.length; i++)
     60  {
     61    experimentalDesign.append(bioMolecularAnnotationItems[i] +",");
     62  }
     63}
     64
     65String [] epidemiologicalDesignItems = request.getParameterValues("epidemiologicalDesign");
     66if(epidemiologicalDesignItems !=null)
     67{
     68  for(int i = 0; i< epidemiologicalDesignItems.length; i++)
     69  {
     70    experimentalDesign.append(epidemiologicalDesignItems[i] +",");
     71  }
     72}
     73
     74String [] methodologicalDesignItems = request.getParameterValues("methodologicalDesign");
     75if(methodologicalDesignItems !=null)
     76{
     77  for(int i = 0; i< methodologicalDesignItems.length; i++)
     78  {
     79    experimentalDesign.append(methodologicalDesignItems[i] +",");
     80  }
     81}
     82
     83String [] perturbationalDesignItems = request.getParameterValues("perturbationalDesign");
     84if(perturbationalDesignItems !=null)
     85{
     86  for(int i = 0; i< perturbationalDesignItems.length; i++)
     87  {
     88    experimentalDesign.append(perturbationalDesignItems[i] +",");
     89  }
     90}
     91
     92String [] technologicalDesignItems = request.getParameterValues("technologicalDesign");
     93if(technologicalDesignItems !=null)
     94{
     95  for(int i = 0; i< technologicalDesignItems.length; i++)
     96  {
     97    experimentalDesign.append(technologicalDesignItems[i]+",");
     98  }
     99}
     100
     101//store the combined String in the bean
     102inputDataBean.setExperimentalDesign(experimentalDesign.toString());
     103
    22104 %>
    23105
     
    48130  <tr>
    49131    <td class="boldText">Treatment</td>
    50     <td class="input"><textarea rows="8" cols="35" id="" name="">my treatment protocol text </textarea></td>
    51     <td><textarea rows="4" cols="25" id="" name="">param1</textarea></td>
     132    <td class="input"><textarea rows="8" cols="35" name="treatmentProtocol">my treatment protocol text </textarea></td>
     133    <td><textarea rows="4" cols="25" name="treatmentProtocolParams">param1</textarea></td>
    52134  </tr>
    53135
    54136  <tr>
    55137    <td class="boldText">Extraction</td>
    56     <td class="input"><textarea rows="8" cols="35" id="" name=""> my extraction protocol text  </textarea></td>
    57     <td><textarea rows="4" cols="25" id="" name="">param2</textarea></td>
     138    <td class="input"><textarea rows="8" cols="35" name="extractionProtocol"> my extraction protocol text  </textarea></td>
     139    <td><textarea rows="4" cols="25" name="extractionProtocolParams">param2</textarea></td>
    58140  </tr>
    59141
    60142  <tr>
    61143    <td class="boldText">Labeling</td>
    62     <td class="input"><textarea rows="8" cols="35" id="" name=""> my labeling protocol text  </textarea></td>
    63     <td><textarea rows="4" cols="25" id="" name="">param3</textarea></td>
     144    <td class="input"><textarea rows="8" cols="35" name="labelingProtocol"> my labeling protocol text  </textarea></td>
     145    <td><textarea rows="4" cols="25" name="labelingProtocolParams">param3</textarea></td>
    64146  </tr>
    65147
    66148  <tr>
    67149    <td class="boldText">Hybridization</td>
    68     <td class="input"><textarea rows="8" cols="35" id="" name="">my hybs protocol text   </textarea></td>
    69     <td><textarea rows="4" cols="25" id="" name="">param4</textarea></td>
     150    <td class="input"><textarea rows="8" cols="35" name="hybridizationProtocol">my hybs protocol text   </textarea></td>
     151    <td><textarea rows="4" cols="25" name="hybridizationProtocolParams">param4</textarea></td>
    70152  </tr>
    71153
    72154  <tr>
    73155    <td class="boldText">Scanning</td>
    74     <td class="input"><textarea rows="8" cols="35" id="" name=""> my scanning protocol text </textarea></td>
    75     <td><textarea rows="4" cols="25" id="" name=""> param5</textarea></td>
     156    <td class="input"><textarea rows="8" cols="35"name="scanningProtocol"> my scanning protocol text </textarea></td>
     157    <td><textarea rows="4" cols="25" name="scanningProtocolParams"> param5</textarea></td>
    76158  </tr>
    77159
Note: See TracChangeset for help on using the changeset viewer.