Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-785

Invoke action parameter with a collection of entities.


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: Core, Core: Viewer: Wicket
    • Labels:


      Overlaps with ISIS-709

      As an Isis user
      I want to pass as an action parameter a collection of entities
      In order to avoid repetitive work to the end-user

      One possible prog model API would be to annotate one of the action params with a new annotation, named @BulkParam, such as in:

      public class TodoItem {

      private TodoItem parentTodoItem;


      public void addRelatedTodo(@Named("To-Do Item") @BulkParam TodoItem todoItem, @Named("Comments") String comments)

      { .... }



      Where the viewer founds it, instead of asking for one TodoItem, it will allow the user to select multiple items.
      Once done, it will execute the action multiple times, passing each time one of the TodoItem selected.
      If there are other params, the viewer will pass on each action invokation the same value for all them.
      Only one param can be annotated with @BulkParam, for avoiding combinatorial explosion (10 items selected of one param, 10 items on the other param would require to be execute 100 times, one for each combination).

      The User Interface could be adapted to the choices or autocomplete parameter facets, for easing the work of the user.

      If "choices", there can be alternative displays (see https://plugins.jquery.com/tag/multiselect/):
      1. the viewer can present the user a grid or checkbox (like the one in http://liveline.github.io/jquery-checkallbox/) with all choices, and the user can check any of them. Alternative: http://www.ryancramer.com/journal/entries/select_multiple/
      2. multi-select drop-down, like this ones: http://ivaynberg.github.io/select2/, http://harvesthq.github.io/chosen/, https://github.com/ehynds/jquery-ui-multiselect-widget, http://www.droplist.vinmein.com/. They require minimal changes on the current actions dialog, but does not allow to always view all choices selected (I could live with it).

      If "autocomplete":
      1. It could be based on a two panels disposition, left and right, where the user incrementally searches on an edit box placed over the left panel, similar to current autocomplete implementation, but placing on the left panel : http://quasipartikel.at/multiselect_next/
      2. Similar approach to the "choices" one, also with this same widget that admits remote dataset loading and min number of chars entered: http://ivaynberg.github.io/select2/

      As seen, a widget like http://ivaynberg.github.io/select2/ would allow to solve both situations without requiring much changes on the viewer’s action dialog.


          Issue Links



              • Assignee:
                danhaywood Dan Haywood
                oscarbou Oscar Bou
              • Votes:
                1 Vote for this issue
                2 Start watching this issue


                • Created: