Changes between Version 6 and Version 7 of Ticket #526, comment 5


Ignore:
Timestamp:
Oct 20, 2014, 9:27:57 AM (10 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #526, comment 5

    v6 v7  
    1212 * JSP file `retractionform.jsp` in `resources/personal/` is coupled to Javascript file `retractionform.js`, and in its "`form`"-tag has an action attribute set to value "`retraction_protocol2.jsp`" (all later files also in `resources/personal/`). The JSP file has an input field for entering a case name or personal number. After initial validation of the case name/personal number, servlet `RetractionFormServlet` is called with command "`GetCaseInfo`" to obtain a JSONObject with information on all cases for the patient in question, which is sent to function `rf.caseInfoLoaded(response)` to be displayed in table form. The form contains checkboxes for setting values for the `Flag` and `AutoProcessing` annotations for the histology and RNA items, as well as a checkbox for selecting whether an unchecked checkbox should trigger the corresponding annotation to be reset to `null` (default is to ignore unchecked checkboxes).[[BR]]a. Button "Register" is coupled to function `rf.submit()`, that calls function `checkBoxValues(...)` to retrieve string-coded checkbox values and send them together with the input case name/personal number to servlet `RetractionFormServlet` with command "`RegisterRetraction`".[[BR]]b. Buttons "Preview" and "Download" are both indirectly coupled to function `rf.doExport(preview)`, but with `preview` set to `true` and `false`, respectively. The latter function creates a table with tab-separated column data of the case/patient information, more suitable for import into spreadsheet programs, although containing several sub-tables with separate headers. If attribute `preview` is `false`, a dialog will be opened to download the table to a file.[[BR]]c. Button "`Create protocol`" is coupled to function `rf.createProtocol()`, that will save input case name/personal number and the number of items to be destroyed in hidden input fields in the HTML form, after which `frm.submit()` is called, which will transfer the action to JSP file `"retraction_protocol2.jsp`, and it related Javascript file `retraction_protocol.js`.
    1313 * JSP file `retraction_protocol2.jsp` in `resources/personal/` is coupled to Javascript file `retraction_protocol.js`. Values for input case name/personal number and the number of items to be destroyed are retrieved from the HTTP response, and `retraction_protocol2.jsp` creates a template for a table of items to be destroyed, one row per item, and `retraction_protocol.js` calls servlet `RetractionFormServlet` with command "`GetProtocolInfo`" (currently identical to command "`GetCaseInfo`") to obtain a JSONObject with information on all cases for the patient in question, which is sent to function `rp.initializeProtocol(response)` to be inserted into the protocol template. The reason for the suffix "`2`" in the name of JSP file `retraction_protocol2.jsp`, is that most protocol wizards have an initial JSP file `retraction_protocol.jsp`, with input fields for information required to retrieve the protocol data, but this role is here taken by `retractionform.jsp`.
     14 * Java servlet class/file `RetractionFormServlet.java` in `src/net/sf/basedb/reggie/servlet/` accepts `GET` requests for commands "`GetCaseInfo`", "`GetProtocolInfo`" (currently identical to "`GetCaseInfo`"), and "`ExportRetractData`", as well as `POST` request for command "`RegisterRetraction`". It accesses the database to retrieve the requested information, or update the contents, and sends the results back in JSON format.
     15 * CSS (Cascading Style Sheet) files `retractionform.css` in `resources/css` and `retractionexport.css` in `resources/personal` contain style information for the forms.