This appendix
provides a list of form field types that is used to define the type of form
fields during form creation in an open automation module. For defining a form
field, it is mandatory to provide the label and type of the form field.
-
FIELD_TYPE_TEXT
The
FIELD_TYPE_TEXT defines a field as text field. It is the default field type. If
the field type is not defined for a form field annotation, the form field is
categorized as text type by default.
Sample
@FormField(label = "Name", help = "Name",
size =FormFieldDefinition.FIELD_SIZE_SMALL)
private String name;
-
FIELD_TYPE_NUMBER
The
FIELD_TYPE_NUMBER defines that a field should contain a numeric value.
Attributes
-
minValue—Specify the minimum acceptable value for
the numeric field. For example, 1.
-
maxValue—Specify the maximum acceptable value for
the numeric field. For example, 65535.
Sample
@FormField(label = "FIELD_TYPE_NUMBER",
type = FormFieldDefinition.FIELD_TYPE_NUMBER, minValue = 1, maxValue = 65535)
private int number;
-
FIELD_TYPE_TABULAR
The
FIELD_TYPE_TABULAR defines a field as a table.
Sample
@FormField(label = "FIELD_TYPE_TABULAR",
type = FormFieldDefinition.FIELD_TYPE_TABULAR,
table = SimpleTabularProvider.SIMPLE_TABULAR_PROVIDER, multiline = true)
private String[] plainTabularValues;
-
FIELD_TYPE_BOOLEAN
The
FIELD_TYPE_BOOLEAN sets a field as boolean type. If the field is selected, the
field value is set as true otherwise the field value is set as false.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_BOOLEAN", type = FormFieldDefinition.FIELD_TYPE_BOOLEAN)
private boolean boolType;
-
FIELD_TYPE_LABEL
The
FIELD_TYPE_LABEL argument lets you specify a label for the field.
Attributes
-
htmlPopupTag—Specify the URL that need to be loaded
in the popup window.
-
htmlPopupLabel—Specify the label for the popup
window.
-
htmlPopupStyle—Set the popup style for the label
using one of the following values:
-
INFO_TAG
-
HELP_TAG
-
CUSTOM_TAG
-
INFO_URL
-
HELP_URL
-
CUSTOM_URL
Sample
@FormField(type = FormFieldDefinition.FIELD_TYPE_LABEL, label = "FIELD_TYPE_LABEL",
htmlPopupTag = "http://www.cisco.com",htmlPopupLabel = "http://www.cisco.com",
htmlPopupStyle = HtmlPopupStyles.CUSTOM_URL)
private String dummyLink;
-
FIELD_TYPE_EMBEDDED_LOV
The
FIELD_TYPE_EMBEDDED_LOV defines the field as embedded list of values (LOV) type
and allows user to select one of value from the list of values.
Sample
@FormField(label = "FIELD_TYPE_EMBEDDED_LOV", help = "Value",
type = FormFieldDefinition.FIELD_TYPE_EMBEDDED_LOV, lovProvider = SimpleLovProvider.SIMPLE_LOV_PROVIDER)
private String value;
-
FIELD_TYPE_PASSWORD
The
FIELD_TYPE_PASSWORD sets a field as password. The characters in a password
field are masked (shown as asterisks or circles).
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_PASSWORD",
type = FormFieldDefinition.FIELD_TYPE_PASSWORD)
private String password;
-
FIELD_TYPE_DATE
The
FIELD_TYPE_DATE defines an input field that should contain a date.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_DATE", type = FormFieldDefinition.FIELD_TYPE_DATE)
private long dateLong;
-
FIELD_TYPE_DATE_TIME
The
FIELD_TYPE_DATE_TIME defines an input field that should contain a date and
time.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_DATE_TIME", type = FormFieldDefinition.FIELD_TYPE_DATE_TIME)
private long dateTime;
-
FIELD_TYPE_MULTI_SELECT_LIST
The
FIELD_TYPE_MULTI_SELECT_LIST defines an input field to accept input from the
multiple values.
Sample
@FormField(label = "FIELD_TYPE_MULTI_SELECT_LIST",
type = FormFieldDefinition.FIELD_TYPE_MULTI_SELECT_LIST, lovProvider = SimpleLovProvider.SIMPLE_LOV_PROVIDER)
private String listValue;
-
FIELD_TYPE_HTML_LABEL
The
FIELD_TYPE_HTML_LABEL defines a field as HTML label. The HTML tag are accepted
as string.
Sample
@FormField(type = FormFieldDefinition.FIELD_TYPE_HTML_LABEL, label = "FIELD_TYPE_HTML_LABEL", htmlPopupLabel = "<a href='http://www.cisco.com'>Cisco</a>")
private String dummyLink2;
-
FIELD_TYPE_FILE_UPLOAD
The
FIELD_TYPE_FILE_UPLOAD defines a field to upload a file.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_FILE_UPLOAD", type = FormFieldDefinition.FIELD_TYPE_FILE_UPLOAD)
private String uploadFileName;
-
FIELD_TYPE_TABULAR_POPUP
The
FIELD_TYPE_TABULAR_POPUP defines the field as a tabular popup type.
Sample
@FormField(label = "FIELD_TYPE_TABULAR_POPUP",
type = FormFieldDefinition.FIELD_TYPE_TABULAR_POPUP, table = SimpleTabularProvider.SIMPLE_TABULAR_PROVIDER)
private String tabularPopup;
-
FIELD_TYPE_EMBEDDED_LOV_RADIO
The
FIELD_TYPE_EMBEDDED_LOV_RADIO defines the field as an embedded LOV radio
buttons.
Sample
@FormField(label = "FIELD_TYPE_EMBEDDED_LOV_RADIO",
type = FormFieldDefinition.FIELD_TYPE_EMBEDDED_LOV_RADIO, mandatory = true, lov = {
"Mode 1", "Mode 2", "Mode 3"}, validate = true, group="FIELD_TYPE_EMBEDDED_LOV_RADIO")
private String modeType = "Select Mode";
-
FIELD_TYPE_HTML_TEXT
The
FIELD_TYPE_HTML_TEXT defines the field as a HTML text type.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_HTML_TEXT", type = FormFieldDefinition.FIELD_TYPE_HTML_TEXT,
editable = true, size=FormFieldDefinition.FIELD_SIZE_MEDIUM_SMALL)
private String status = "<h1>FIELD_TYPE_HTML_TEXT</h1>";
-
FIELD_TYPE_LABEL_WITH_SPACE
The
FIELD_TYPE_LABEL_WITH_SPACE defines the field as a label with space.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_LABEL_WITH_SPACE",
help = "Ordering of VNICs", type = FormFieldDefinition.FIELD_TYPE_LABEL_WITH_SPACE)
private String vnicLabel;
-
FIELD_TYPE_IMAGE_SELECT_LIST
The
FIELD_TYPE_IMAGE_SELECT_LIST defines the field that should accept selection of
image from the image select list.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_IMAGE_SELECT_LIST", type = FormFieldDefinition.FIELD_TYPE_IMAGE_SELECT_LIST, mandatory = false, editable = true)
private String catalogIcon;
-
FIELD_TYPE_BUTTON_PANEL
The
FIELD_TYPE_BUTTON_PANEL defines the field as a button panel.
Attributes
-
lov—Specify the
registered LOV provider name. Also, you can can directly give the values as Lov
={http,https}. For more information, refer the SimpleLovProvider.java sample
LOV provider in the open automation module.
Sample
@FormField(label = "FIELD_TYPE_BUTTON_PANEL",
type = FormFieldDefinition.FIELD_TYPE_BUTTON_PANEL,
lov = {"Discover Servers"}, validate = true, group = "UCSM/CIMC Common", mandatory = false)
private String discoverServers = "Discover Servers";
-
FIELD_TYPE_TEXT_LINE_NUMS
The
FIELD_TYPE_TEXT_LINE_NUMS defines the field as a text field with line numbers.
Sample
@FormField(label = "FIELD_TYPE_TEXT_LINE_NUMS",
help = "Error Text to validate", mandatory = false,
multiline = true, maxLength = 8192,
type = FormFieldDefinition.FIELD_TYPE_TEXT_LINE_NUMS,
size = FormFieldDefinition.FIELD_SIZE_SMALL_LARGE)
private String message;
-
FIELD_TYPE_LARGE_FILE_UPLOAD
The
FIELD_TYPE_LARGE_FILE_UPLOAD defines a field that should allow user to upload a
large file.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "", help = "Upload a file",
mandatory = true, validate = true, type = FormFieldDefinition.FIELD_TYPE_LARGE_FILE_UPLOAD,
annotation = "For module uploads only zip format are supported")
private String uploadFile;
-
FIELD_TYPE_COLORPICKER
The
FIELD_TYPE_COLORPICKER defines a field to pick a color.
Attributes
No specific
attribute for this field.
Sample
@FormField(label = "FIELD_TYPE_COLORPICKER", help = "Color",
mandatory = true, validate = true, type = FormFieldDefinition.FIELD_TYPE_COLORPICKER)
private String color;