LP#
1117808: new egFmValueSelector directive
This directive supplies a select widget that draws its
values from a table specified by an IDL class code. It
is meant to be used for tables containing a reasonably
small number of rows (i.e., dozens at most, not hundreds
or thousands).
The following attributes are available:
idl-class : Code of IDL class to draw from, e.g., "vmp".
ng-model : Model to bind the current selected value to.
filter : JSON query filter to apply conditions on the set
of rows to be used. (optional)
sticky-setting : Local storage key to persist the last value
that was selected by the user. (optional)
ou-setting : Name of library setting to use to set the default
selected value. If sticky-setting is used, any
previously-selected value will override the default
specified by the OU setting. (optional)
The list of values from the source table displayed in the select
widget are those that meet all of the following conditions:
- primary key is not null
- filter conditions (if supplied)
- logged-in user has PCRUD permissions to view the value
The option value is taken from the column in the source table
specified by the oils_persist:primary IDL attribute, while
the displayed label is taken from the column that has the
reporter:selector="name" IDL attribute.
Example:
<eg-fm-value-selector
idl-class="vmp"
ng-model="merge_profile"
filter="{'preserve_spec':{'=':null}}"
sticky-setting="eg.cat.z3950.selected_merge_profile"
ou-setting="cat.default.merge_profile"
></eg-fm-value-selector>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>