/
Picker control Improvements

Picker control Improvements

Picker control (block "inp_edit_picker") allows to move selected options from one list (available options) to another list (selected options) and back.

Right now only database table can act as source for options, that can be moved. I think we can improve that, by:

  1. adding "mode" parameter to "PredefinedOptions" tag with following values:
    • any - display all options and add "selected" to selected ones (this is default behavior and what we have now)
    • selected - display options, that are selected in this field
    • available - display options, that are not selected in this field
  2. instead of asking database to retrieve list of selected/available options just use PredefinedOptions tag and pass new "mode" parameter.

This will work, because to display selected options in a field in the grid we already set kOptionsFormatter to a field, which queries database for all options.

Proposed solution implies, that:

  • will be storing all selected options in main unit table in "|value1|value5|valueN|" form
  • values, displayed in picker (on form editing) matches ones, displayed in grid

If we still need to allow storage in external table, then EditPickerHelper class needs to be adjusted.