Changeset 529


Ignore:
Timestamp:
Jan 10, 2008, 10:16:04 AM (13 years ago)
Author:
mbayer
Message:

have added code to collect the values of the files selected from the mappings page and string them together so they can be passed to the plugin code as a single parameter

Location:
branches/uk_ac_ebi_Tab2MageImporter
Files:
7 edited

Legend:

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

    r528 r529  
    1111final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    1212final String ID = sc.getId();
    13 final String requestID = request.getParameter("requestId");
     13final String requestID = request.getParameter("requestID");
    1414
    1515//we also need to figure out the name/id of the currently selected experiment that this import is getting initiated from
     
    130130<form name="experimentData" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/protocols.jsp" method="post">
    131131<input type="hidden" name="ID" value="<%=ID%>">
     132<input type="hidden"name="requestID" value="<%=requestID%>">
    132133
    133134<table cellpadding="0" cellspacing="0">
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/hybridizations.jsp

    r528 r529  
    1111final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    1212final String ID = sc.getId();
    13 final String requestID = request.getParameter("requestId");
     13final String requestID = request.getParameter("requestID");
    1414 %>
    1515
     
    139139    <td class="boldText">Dye-swap</td>
    140140    <td class="input">yes <input type="radio" name="dyeSwap" value="yes"> no <input type="radio"
    141       name="parameter:dyeSwap" value="no" checked="checked"> <br>
     141      name="dyeSwap" value="no" checked="checked"> <br>
    142142     
    143143    </td>
     
    149149    <td class="boldText">Reference sample</td>
    150150    <td class="input">yes <input type="radio" name="refSample" value="yes" > no <input type="radio"
    151       name="parameter:refSample" value="no" checked="checked"></td>
     151      name="refSample" value="no" checked="checked"></td>
    152152    <td>If you used a reference sample please indicate this here.</td>
    153153  </tr>
     
    194194    <td class="boldText">Sample pooling:</td>
    195195    <td class="input">yes <input type="radio" name="pooling" value="yes"> no <input type="radio"
    196       name="parameter:pooling" value="no" checked="checked"></td>
     196      name="pooling" value="no" checked="checked"></td>
    197197    <td>If the samples were pooled please indicate this here.</td>
    198198  </tr>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/mappings.jsp

    r528 r529  
    1414  final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    1515  final String ID = sc.getId();
    16   final String requestID = request.getParameter("requestId");
     16  final String requestID = request.getParameter("requestID");
    1717%>
    1818
     
    2727<script language="JavaScript" src="<%= request.getContextPath()%>/include/scripts/main.js" type="text/javascript"></script>
    2828<script language="JavaScript" type="text/javascript">
    29   //submits form
    30   function submit()
    31   {
    32     document.mappings.submit();
    33   }
    34     function getRoot()
    35     {
    36       return '/base/';
    37     }
    38     function getScale()
    39     {
    40       return 1.0;
    41     }
     29
     30//submits form
     31function submit()
     32{
     33  var frm = document.forms['mappings'];
     34  frm.submit();
     35}
     36
     37
     38function getRoot()
     39{
     40  return '/base/';
     41}
     42
     43function getScale()
     44{
     45  return 1.0;
     46}
    4247</script>
    4348
     
    5156
    5257<input type="hidden" name="ID" value="<%=ID%>">
    53 <input type="hidden" name="cmd" value="SetParameters"> <input type="hidden" name="requestID" value="<%=requestID%>">
    54 
    55 <!-- these are the parameters from the input pages; need to pick them up individually from the bean here; ugly as hell but can't be done any other way -->
     58<input type="hidden" name="cmd" value="SetParameters">
     59<input type="hidden" name="requestID" value="<%=requestID%>">
     60<input type="hidden" id="fileStringParam" name="param:fileStringParam" value""/>
     61
     62<!-- these are the parameters from the previous input pages; need to pick them up individually from the bean here; ugly as hell but can't be done any other way -->
    5663
    5764<!-- inputs from experiment.jsp page -->
     
    97104<input type="hidden" name="parameter:tissues" value="<%=inputDataBean.getTissues()%>">
    98105<input type="hidden" name="parameter:pooling" value="<%=inputDataBean.getPooling()%>">
    99 <input type="hidden" name="file_id" value="<%=(String)request.getAttribute("file_id") %>">
    100 <input type="hidden" name="parameter:zipFile" value="<%=(String)request.getParameter("path") %>" id="zipFile">
     106<input type="hidden" name="parameter:zipFile" value="<%=request.getParameter("path") %>" id="zipFile">
    101107
    102108<%
    103   System.out.println("all parameter values in mappings.jsp:");
     109  System.out.println("all parameter values for mappings.jsp:");
    104110  for (java.util.Enumeration e = request.getParameterNames(); e.hasMoreElements();)
    105111  {
     
    200206    <!-- first we need a cell with a drop down menu where we can select a filename to match the combination of factor values-->
    201207
    202     <td class="input" name="fileinput<%=i %>"><select>
     208    <td class="input" ><select id="fileinput<%=i %>">
    203209      <%
    204210          for (int k = 0; k < fileNamesArr.length; k++)
     
    243249</form>
    244250
     251<script language="JavaScript" type="text/javascript">
     252//collects all the values from the file selector boxes and strings them together so they can be
     253//passed on as a single parameter for plugin configuration
     254{
     255  var fileString = '';
     256  var frm = document.forms['mappings'];
     257  var numElements = frm.elements.length;
     258  document.write(numElements);
     259  document.write("<br />");
     260  for(var i = 0; i < numElements; i++)
     261  {
     262    var value = frm.elements[i].value;
     263    var id = frm.elements[i].id;
     264
     265    if(id.match("fileinput"))
     266    {
     267      document.write("id = " + id);
     268      document.write("<br />");
     269      document.write("value = " + value);
     270      document.write("<br />");
     271      fileString += frm.elements[i].value + '\t';
     272    }
     273  }
     274  document.write('combined output = ' + fileString);
     275  frm.fileStringParam.value = fileString;
     276  document.write('value of hidden input = ' + frm.fileStringParam.value);
     277}
     278</script>
     279
    245280</body>
    246281</html>
  • branches/uk_ac_ebi_Tab2MageImporter/jsp/uk/ac/ebi/nugo/plugins/protocols.jsp

    r528 r529  
    3434final SessionControl sc = Base.getExistingSessionControl(pageContext, true);
    3535final String ID = sc.getId();
    36 final String requestID = request.getParameter("requestId");
     36final String requestID = request.getParameter("requestID");
    3737
    3838
     
    120120<form name="protocols" action="<%= request.getContextPath()%>/plugins/uk/ac/ebi/nugo/plugins/hybridizations.jsp" method="post">
    121121<input type="hidden" name="ID" value="<%=ID%>">
     122<input type="hidden"name="requestID" value="<%=requestID%>">
    122123
    123124<h1>Tab2MAGE Importer -- Your Protocols</h1>
  • branches/uk_ac_ebi_Tab2MageImporter/src/uk/ac/ebi/nugo/plugins/Tab2MageImporter.java

    r521 r529  
    113113          "hybridizationProtocolParams","scanningProtocolParams","platform","organism",
    114114          "numDesigns","dyeSwap","refSample","numTreatmentGroups","expFactors","numReplicates",
    115           "tissues","pooling","zipFile"};
     115          "tissues","pooling","zipFile", "fileStringParam"};
    116116 
    117117
Note: See TracChangeset for help on using the changeset viewer.