cspace-config Fields
- 1 What is a Field
- 2 Where are Fields
- 3 Structure of Fields
- 3.1 field
- 3.1.1 attributes
- 3.1.1.1 id
- 3.1.1.2 mini
- 3.1.1.3 autocomplete
- 3.1.1.4 container
- 3.1.1.5 xxx_ui_refactored
- 3.1.1.6 userecord
- 3.1.1.7 selector-affix
- 3.1.1.8 ui-search
- 3.1.1.9 ui-type
- 3.1.1.10 ui-readonly
- 3.1.1.11 seperate_ui_container
- 3.1.1.12 as-expander
- 3.1.1.13 in-title
- 3.1.1.14 exists-in-services
- 3.1.1.15 services-readonly
- 3.1.1.16 display-name
- 3.1.1.17 section
- 3.1.1.18 datatype
- 3.1.2 Simple Elements
- 3.1.2.1 selector
- 3.1.2.2 linktext
- 3.1.2.3 linktext-target
- 3.1.2.4 autocomplete-selector
- 3.1.2.5 container-selector
- 3.1.2.6 title-selector
- 3.1.2.7 services-tag
- 3.1.2.8 services-filter-param
- 3.1.2.9 default
- 3.1.3 Complex Elements
- 3.1.3.1 merges
- 3.1.3.2 enum
- 3.1.3.2.1 has-blank (property)
- 3.1.3.2.2 default (element)
- 3.1.3.2.3 blank-value(element)
- 3.1.1 attributes
- 3.1 field
What is a Field
Fields are used in creation of the UISPEC.
They connect the service layer definitions with the ui definitions of items and they also help in the creation of the uispec
Where are Fields
Fields are part of the record element of the cspace-config
Structure of Fields
<field id="nametitle" mini="summary,list" exists-in-services="false">
<selector>.csc-object-identification-object-nametitle</selector>
<merges>
<merge id="title" rank="1"/>
<merge id="objectName" rank="2"/>
</merges>
</field>
<field id="title" in-title="yes" mini="list">
<title-selector>.csc-titleBar-object-identification-object-title</title-selector>
<selector>.csc-object-identification-object-title</selector>
</field>
<field id="titleLanguage" autocomplete="vocab-languages" ui-type="enum">
<enum-default>English</enum-default>
<selector>.csc-object-identification-object-title-language</selector>
</field>
field
attributes
id
string
no default required
mini
set of strings from number|summary|list|search|relate|terms
default {""}
defines the fields that are used in find and edit and search results
number - only one field can be set as number
summary - only one field can be set as summary
list - multiple fields can be set as list
will be used in Find & Edit page and lists on tabs to set columns required
search - multiple fields can be set as search
will be used in the search results to set columns required
relate - multiple fields can be set as relate
will be used in the RH related Object and relatedProcedures to set columns required
terms - multiple fields can be set as terms
will be used in the RH side termsUsed section to set columns required
autocomplete
set of strings
default {""}
allows authorities (or multiple authorities) to be link to a specific field so that they can use autocomplete
instance id of authority is used as the string reference in this context
container
boolean true|false 1|0 yes|no
default false
used as UI refactors as some fields need a separate container label and some do not
xxx_ui_refactored
boolean true|false 1|0 yes|no
default true
a temporary marker to be used until the UI refactors all their containers
userecord
string
default ""
used mostly by groups/repeats allows a field to be defined as a record. value should be the id of a record.
selector-affix
string
default ""
tobe used when you have multiple fields with userecord set to the same record as it allows you to set a affix that will be included into the UI selector for the fields in the schema and spec.
ui-search
string range|repeatable|single
default blank
if a string is specified then it will set this field as an advanced searchable field in the uispec that is sent to the UI
If the UI sends back a request with a string that hasn't been specified with the ui-search attribute the app will still create the correct search string to send to the service layer. This flag is purely to create the appropriate uispec and uischema for the UIrange is used for date ranges
repeatable is used when you want the field to be repeatable in UI for advanced search
single is used for a non-repeatable field in the UI search page
ui-type
string plain|list|date|linktext|dropdown|enum
default "plain"
describes how the field will be described in the uispec. Controls the markup.
ui-readonly
boolean true|false 1|0 yes|no
defaults to the value of services-readonly
if true, instructs the ui to disable editing of the field. Only has an effect in combination with certain non-default ui-types.
seperate_ui_container
boolean true|false 1|0 yes|no
default false (unless type = date then defaults to true)
marks those element which require separate containers in the uispec
as-expander
boolean true|false 1|0 yes|no
default false
used by the ui if expander required in uispec
in-title
boolean true|false 1|0 yes|no
default false
used by the ui to define if a field exists in the title
exists-in-services
boolean true|false 1|0 yes|no
default true
allows certain fields to be set as false and therefore ignored by the service layer but exist in the uispecs etc
services-readonly
boolean true|false 1|0 yes|no
default false
if true, the field is omitted from XML payloads sent to the services layer
display-name
boolean true|false 1|0 yes|no
default false
used by authorities to define which item is used in computeDisplayName
section
string
default "common"
service layer tag - used to define the name of the multipart document
datatype
string
default "string"
can set to "boolean" for checkbox input
Simple Elements
selector
string
default ".csc-" + parentID + "-" + id
UI tag used in uispec creation
linktext
string
default "${items.0.number}"
UI used in uispec creation
linktext-target
string
default "${items.0.recordtype}.html?csid=${items.0.csid}"
UI tag used in uispec creation
autocomplete-selector
string
default selector + "-autocomplete"
UI used in uispec creation
container-selector
string
default selector + "-container"
UI used in uispec creation
title-selector
string
default selector + "-titlebar"
UI used in uispec creation
services-tag
string
default id
UI used in uispec creation
services-filter-param
string
default null
services - used to create restrictions sent to service layer for /accounts
default
string
default ""
Only has an effect if the
datatypeattribute is set to "boolean". Sets the default value of a boolean field. Values of "true", "yes", and "1" (case-insensitive comparison) are interpreted as true, all other values are false.
Complex Elements
merges
no documention yet
enum
<enum has-blank="true">
<default>English</default>
<blank-value>Please select a value</blank-value>
</enum>
has-blank (property)
boolean true|false 1|0 yes|no
default true
used to define whether a blank field should prefix this controlled list
default (element)
String
default null
used to select which value in the controlled list should be shown as the default value
blank-value(element)
String
default - record/enum-blank
if enum has-blank=true then this is the text that will be shown for the blank entry in the list
if this tag is not included then it will fall back to the value set in record/enum-blank and if that is not set it will fall back to records/enum-blank and if that is not set it will use the value "Default String"