5 | | * JSP script `flowcell_protocol.jsp` will display a selection box of flow cells, that have not yet been processed. It will contain "Create protocol" and "Cancel" buttons. Function `init()` will call function `getFlowCells()` to get a list of unprocessed flow cells from Java servlet `FlowCellServlet.java`. The "Create protocol" button will be coupled to function `goCreate()`, which will call function `getSelectBoxResults(elementId)` to get a comma-separated list of selected flow cell id values. |
| 5 | * JSP script `flowcell_protocol.jsp` will display a selection box of flow cells, that have not yet been processed. It will contain "Create protocol" and "Cancel" buttons. Function `init()` will call function `getFlowCells()` to get a list of unprocessed flow cells from Java servlet `FlowCellServlet.java`. The "Create protocol" button will be coupled to function `goCreate()`, which will call function `getSelectBoxResults(elementId)` to get a comma-separated list of selected flow cell database id values, that is inserted into hidden input field "`flowcellidlist`", which makes it possible for java scriptlet code to retrieve the list string after the document has been submitted to JSP script `flowcell_protocol2.jsp`. In the same manner, function `getFlowCellNumLanesList(idList)` is called to get a comma-separated list of the number of lanes for the selected flow cells, that is inserted into hidden input field `numlaneslist`. |
| 6 | * JSP script `flowcell_protocol2.jsp` uses java scriptlet code to retrieve the selected flow cell database id values, and number of lanes per flow cell. The scriptlet code uses this data to produce the right number and size of tables for the flow cell data in the protocol. The comma-separated flow cell database id values are inserted into hidden input field `fcIdList`, to make it avaiable to javascript code in the JSP script. Javascript function `init()` retrieves the id list string, and calls function `getFlowCellInfo(idList)` (identical to the function with the same name in JSP file `flowcell_protocol.jsp`) to get a JSONArray of data for the flow cells, which is used as argument, when calling function `viewAsList(flowCellInfoArray)`. Function `viewAsList(flowCellInfoArray)` inserts data from the flow cells into the tables prepared by the Java scriptlet code. |