Controlling behavior of default field details panel in Verify client
You can configure the behavior of the default field details panel in the Verify client by changing the Verify task settings or adding field variables in the page data file.
Controlling behavior of the default field details panel with task settings
You can use the following three task settings that are added to the verify task settings XML file
under the PageProcessing section as follows:
- <V n="HideSnippetInDP" label="Hide Snippet in Default Panel" tip="Hide snippets in the default panel" type="checkbox">0</V>
- <V n="UseTextAreaByDefault" label="Enable Multiple Line Editor" tip="Use multiple line editor for the text fields in the default panel" type="checkbox">0</V>
- <V n="DefaultFieldWidth" label="Default Field Width(for example, 180px)" tip="Default Field Width" type="text"></V>
The new verify task will have those settings automatically. If you want to use them in an existing verify task, you must add them to the corresponding task settings file manually.
- HideSnippetInDP
- Specifies whether to show or hide the snippet above each field in the default field details panel. The default value is 0, which means the snippets are shown.
- UseTextAreaByDefault
- Specifies whether to use multiple line editor for text fields in the default field details panel. The default value is 0 that means, the text fields uses text box editor, which shows the text content in a single line. The value 1 means the text area editor is used for text fields whose value can be shown and edited in multiple line mode.
- DefaultFieldWidth
- Specifies the field width of all fields in the default field details panel. Its value must be
comprised of a number and unit string
px
that meanspixel
at the end.
Controlling behavior of the default field details panel with field variables
The above task settings will take effect on all fields in the default field details panel. If you
want to control the behavior of the specific field, or want different fields to have different
behaviors in the default field details panel, you can use the following field variables:
- ShowSnippet
- True or False: Controls whether this field has a snippet shown above the field in the default
field details panel.Note: The Show/Hide snippet for a single field can be enabled by checking/unchecking the ShowSnippet option in the field’s Value Editor Settings section. For a combination of multiple fields (for example, Lineitem) you cannot set Show/Hide snippet. In that case, snippet area is always visible.
- EditorClass
- Specifies the editor used for this field in the default field details panel. For example, if you want to edit this field in multiple line mode, you can specify its EditorClass variable as datacapweb/widget/editors/DCITextareaEditor.
- FieldOrder
- A number used to control the order of the field in the default field details panel. It can starts with 0 or 1. The field with the smaller FieldOrder value is placed before the one with the larger value. All the fields with such a variable will be placed before the fields without this variable.
- FieldWidth
- Specifies the width of a field in the default field details panel. The value must end with the
unit string
px
.
EditorClass, Showsnippet, and FieldWidth can be used both for a field in the page data file and for a field definition in the setup DCO. The variable setting in the field from page data file has higher priority than the one in the field definition from the setup DCO.
Now you can see some field behavior can be configured in more than one ways. For example, you can
configure whether to show snippets by a custom panel, task settings or a field variable. The
priority of those settings are Custom panel > Field
variable > Setup DCO >Task
setting. That means, for a field:
- If there is a custom panel specified, then it uses custom panel setting to determine its behavior, like whether to show a snippet, what editor class is used and the width of the field.
- If no custom panel is specified, but the field has field variables for those settings in the page data file, then those field variables will determine its behavior.
- If neither custom panel nor field variables specified, the task settings will be used to determine its behavior.