Uploaded image for project: 'XNAT'
  1. XNAT
  2. XNAT-5102

Add support for list widgets in Spawner: currently saving a list breaks XNAT

    Details

    • Rank:
      0|ii1dzr:

      Description

      The new interactiveAgentIds and dataPaths site configuration preferences are lists of strings. In the site admin YAML, these are both declared as panel.input.text. These render fine in the admin UI as text with the comma-separated strings:

      .*MSIE.*, .*Mozilla.*, .*AppleWebKit.*, .*Opera.*
      

      The problem is that this value is submitted as a single string value ".MSIE., .Mozilla., .AppleWebKit., .Opera.", which causes preference initialization to fail catastrophically on subsequent restarts.

      To fix:

      • The array-list class is being set on the input element. That can be used to detect that the data is a list, split on the ", " delimiter and converted to an array before being POSTed to the server
      • A new list widget should be added. Initially this might be almost exactly the same as the text widget, but support an optional delimiter, which would default to ", " but would allow, e.g., "; ", "/", or whatever. Eventually this would allow for different list types to be used based on options specified for the widget.

        Issue Links

          Activity

          Hide
          jrherrick@wustl.edu Rick Herrick added a comment -

          There was an issue with how lists were handled in the bulk property change method so that the list objects weren't getting properly converted to JSON when being stored in the database. Fixed that, am converting this to an minor improvement instead of blocker bug, it would still be nice to have list-specific widgets.

          Show
          jrherrick@wustl.edu Rick Herrick added a comment - There was an issue with how lists were handled in the bulk property change method so that the list objects weren't getting properly converted to JSON when being stored in the database. Fixed that, am converting this to an minor improvement instead of blocker bug, it would still be nice to have list-specific widgets.

            People

            • Assignee:
              moore.c@wustl.edu Charlie Moore
              Reporter:
              jrherrick@wustl.edu Rick Herrick
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: