Attribute settings: List

From CollectiveAccess Documentation
Jump to: navigation, search

[Valid for v1.6]

Represents a value chosen from a drop-down list populated with values from a specified list as defined in the ca_lists table. ExampleList.png

This attribute also supports several render settings such as 'radio_buttons':

ExampleList RadioButtons.png


ExampleList CheckBoxes.png


ExampleList TypeAhead.png

and other specifications.

Hierarchical lists may be rendered vertically or horizontally, as show below:

ExampleList Horiz hierbrowser.png

The list (array) of attribute settings can be viewed in the application code at

Settings Description Default Values
listWidth Width, in characters or pixels, of the list when displayed in a user interface. When list is rendered as a hierarchy browser width must be in pixels. 40 Characters or pixels
listHeight Height, in pixels, of the list when displayed in a user interface as a hierarchy browser. 200px Pixels
maxColumns Maximum number of columns to use when laying out radio buttons or checklist. 3 Integers greater than zero
render Determines how the list is displayed visually. Drop-down list ('select') Drop-down menu (code="select"); Yes/no checkbox (code="yes_no_checkboxes"); Radio buttons (code="radio_buttons"); Checklist (code="checklist"); Type-ahead lookup (code="lookup"); Horizontal hierarchy browser (code="horiz_hierbrowser"); Horizontal hierarchy browser with search (code="horiz_hierbrowser_with_search"); Vertical hierarchy browser (code="vert_hierbrowser")
doesNotTakeLocale Defines whether element takes locale specification 1 (does not take locale specifications) 0 or 1
requireValue Defines whether a list item must be explicitly set. If set to 1 then a valid list item must be selected, and in the absence of a selected value the default value is used. If set to zero then a "null" value (labeled "none" in the English locale or whatever value is set in nullOptionText below) is added to the list and made default 1 (require value) 0 or 1
canBeUsedInSort Use this option if this attribute value can be used for sorting of search results. 1 (used in sort) 0 or 1
canBeUsedInSearchForm Use this option if the attribute value can be used in search forms 1 (used in search forms) 0 or 1
canBeUsedInDisplay Use this option if the attribute value can be used for display in search results 1 (used for display) 0 or 1
displayTemplate Layout for value when used in a display. Element code tags prefixed with the ^ character, used to represent the value in the template. For example: <i>^my_element_code</i>. HTML
displayDelimiter Delimiter to use between multiple values ; (semicolon) Text
canMakePDF Check this option if this metadata element can be output as a printable PDF. (The default is not to be.) 0 0 or 1
CanMakePDFForValue Check this option if individual values for this metadata element can be output as a printable PDF. (The default is not to be.) 0 0 or 1
auto_shrink Check this option if you want the hierarchy browser to automatically shrink or expand based on the height of the column with the most data. Only affects the horizontal browser! 0 0 or 1
nullOptionText Text to use as label for the "no value" option when a value is not required. (not set) Text (?)
useDefaultWhenNull Check this option if the list default value should be used when the item value is null. (The default is to disregard the default value and show the null value. 0 0 or 1
implicitNullOption Check this option if you want to accept an empty selection as a null value. 0 0 or 1
hideIfSelected Set (and repeat) this setting to hide dependent bundles depending on the selected item in a List. See below for a complete explanation of this setting table_ui/screen_code/ca_attribute_element

Control Display of Dependent Bundles

Bundles can be hidden in the editor unless specific items are selected in a list element (for example hide a Specify Other text field unless the Other option is selected in a list.

This feature uses a special setting option "hideIfSelected_[list_code]" that has as its value the bundle that should be hidden in the format: table_ui/screen_code/ca_attribute_code. This setting is formatted generally as follows:

<setting name="hideIfSelected_[list_code]">table_ui/screen_code/ca_attribute_code</screen>

This setting should be repeated for all list items for which the bundle should be repeated. So to continue the example, for a list of 4 items, with the last being "Other", the hideIfSelected setting would be repeated for each of the first three list items.



Personal tools