Menu

FORM

Provides tags that are used to construct content for Forms in Controller-based templates.

Tags of this library may only be used in Forms of Controller-based templates.

checkbox

Creates a checkbox. Produces a variable whose value is a Boolean: true when the box is checked, false if not checked.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the Boolean value representing the status of the checkbox.
value

Required
Value type
EL-evaluated
No Boolean Yes
Defines the initial state of the checkbox. If the resolved value is true, the box is checked, otherwise it is not.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the checkbox.

dateInput

Produces an input component that allows the user to select a date. The variable created holds the selected date as a Date value.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the Date value representing the selected date.
value

Required
Value type
EL-evaluated
No Date Yes
Defines the date initially displayed by the component.

If not defined, the component starts out by displaying the current date.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the component.
dateFormat

Required
Value type
EL-evaluated
No String Yes
Defines a format defining how the component displays the selected date. The resolved String should be the name of a date or dateTime format, which is then used to format the display.

If not defined, the default date format, if defined, is used for formatting instead. Otherwise the selected date is presented in an undefined format.

group

This tag can be used to group other form components under a heading. Place the tags generating the components you wish to group as children of this tag.

Attributes

title

Required
Value type
EL-evaluated
No String Yes
Defines a title for the group.
hidden

Required
Value type
EL-evaluated
No Boolean No
Defines the group's initial visibility. If the resolved value is true, the group is hidden.
name

Required
Value type
EL-evaluated
No String No
Defines the name of the group.

input

Creates a text input component. Produces a variable with the input's text as a String.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the String value representing the text of the input.
value

Required
Value type
EL-evaluated
No String Yes
Defines the initial text within the input.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the input.

multiSelect

Creates a form component that presents selectable options in one container and selected options in another. Options can be moved between the containers using the included buttons. Another set of buttons allows the selected options to be moved up and down; the order of the options in this container defines the order of the option values as they appear in the Collection this component produces as its value, with the topmost option being the first value of the Collection.

Child tags

  • option
    Optional. Each of these child tags adds one selectable option.
  • optionSet
    Optional. Adds several selectable options.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the String value representing the text of the input.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the input.
size

Required
Value type
EL-evaluated
No Integer Yes
Defines how many options are visible at a time. The resolved value cannot be less than 5.

If not defined, value of 10 is used.
width

Required
Value type
EL-evaluated
No String Yes
Defines the width of the component. The resolved String should be a valid CSS length or percentage value.

If not defined, value "95%" is used.
optionsLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label that appears above the container of selectable options.

If not defined, no label will be displayed for the container.
selectedLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label that appears above the container of selected options.

If not defined, no label will be displayed for the container.
addLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label of the button that moves an option to the container of selected options.

If undefined, the label of the button will be "Add".
removeLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label of the button that moves an option to the container of selectable options.

If undefined, the label of the button will be "Remove".
upLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label of the button that moves a selected option up one step.

If not defined, the label of the button is "Up".
downLabel

Required
Value type
EL-evaluated
No String Yes
Defines the label of the button that moves a selected option down one step.

If not defined, the label of the button is "Down".
disableUpDown

Required
Value type
EL-evaluated
No Boolean Yes
This attribute can be used to hide the buttons moving selected options up and down. If the resolved value is true, the buttons are hidden.

option

Adds an option to the selectable options presented by the component produced by a select or multiSelect parent tag.

Parent tags

  • multiSelect
    Required. The option is added to the component produced by this parent tag.
  • select
    Required. The option is added to the component produced by this parent tag.

Attributes

title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the option.
value

Required
Value type
EL-evaluated
No String Yes
Defines the value of the option. 
selected

Required
Value type
EL-evaluated
No Boolean Yes
Defines whether this option starts out as being selected or not. If the resolved value is true, the option is selected.

optionSet

Adds one or more options to the selectable options presented by the component produced by a select or multiSelect parent tag.

Parent tags

  • multiSelect
    Required. The options are added to the component produced by this parent tag.
  • select
    Required. The options are added to the component produced by this parent tag.

Attributes

values

Required
Value type
EL-evaluated
Yes Collection Yes
Defines the options in this set. The resolved Collection is expected to contain Maps - one Map per option. Each Map should contain two entries, one for the option's title and one for its value. The keys for those entries should match the resolved values of the titleKey and valueKey attributes.
titleKey

Required
Value type
EL-evaluated
Yes String Yes
Defines the key with which the title, or label, of an option is retrieved with from a Map within the Collection that values resolves into. 
valueKey

Required
Value type
EL-evaluated
Yes String Yes
Defines the key with which the value of an option is retrieved with from a Map within the Collection that values resolves into.
selected

Required
Value type
EL-evaluated
No Boolean Yes
Defines whether this set's options start out as being selected or not. If the resolved value is true, the options are selected.

radio

Adds a radio button to the group of these buttons created by a radioButtons tag.

Parent tags

  • radioButtons
    Required. The radio button is added to the group created by this parent tag.

Attributes

value

Required
Value type
EL-evaluated
No String Yes
Defines the value of the button.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the button.
onchange

Required
Value type
EL-evaluated
No String No
Defines a function that occurs when this radio button's state changes. The resolved String should be a function that either hides or shows a specified form component.

The function can be either "dynamoUtils.hideFormControl(componentID)" or "dynamoUtils.showFormControl(componentID)". In both the "componentID" should be the ID of the component to hide or show.

radioButtons

Creates a group of radio buttons of which one may be selected at a time. The options that this control presents are created by radio child elements. Produces a variable that holds the resolved value of the selected radio button.

Child tags

  • radio
    Optional. Each of these child tags adds one button to this group.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the selected button's value. The value is whatever the radio tag generating the button has as its resolved value value. 
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the button group.

richTextArea

Generates a rich text area editor for creating HTML content.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the editor's content as a HTML value.
value

Required
Value type
EL-evaluated
No String Yes
Defines the initial contents of the editor.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the editor.
height

Required
Value type
EL-evaluated
No Integer Yes
Defines the height of the editor in pixels.

If not defined, value of 200 is used.
width

Required
Value type
EL-evaluated
No Integer Yes
Defines the width of the editor in pixels.

If not defined, value of 400 is used.
toolbar

Required
Value type
EL-evaluated
No Collection Yes
Defines the toolbar(s) of the editor. The resolved Collection is expected contain Strings listing tool names. The named tools then appear in the toolbar in the order they're found in the Collection.

Names of tools include: "Undo", "Redo", "Bold", "Italic", "Underline", "Strike", "Link", "JustifyLeft", "JustifyCenter", "JustifyRight", "NumberedList", "BulletedList", "Indent", "Outdent"

Additionally, "-" may be used between tool name Strings to define that the following tools go into a new toolbar.

select

Creates a component presenting a set of options of which one or more may be selected at a time. Produces a variable that will either be a String (if only single option can be selected) or a Collection of Strings (if multiple options can be selected).

Child tags

  • option
    Optional. Each of these child tags adds one selectable option.
  • optionSet
    Optional. Adds several selectable options.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the selected value(s). The value is either a String or a Collection of Strings depending on the resolved value of multiple.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the component.
multiple

Required
Value type
EL-evaluated
No Boolean Yes
Defines whether the component allows multiple options to be selected at a time. If the resolved value is true, multiple options can be selected. Note that this also affects the kind of variable value this component produces.
size

Required
Value type
EL-evaluated
No Integer Yes
Defines how many options are visible at a time.

If not defined, the value is 1 is multiple resolves to false, 3 if it resolves to true

textarea

Creates a text area, which is a text input that can display more than one line of text. Produces a variable holding the input's content as a String.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the String value representing the text of the input.
value

Required
Value type
EL-evaluated
No String Yes
Defines the initial value of the input.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the input.
rows

Required
Value type
EL-evaluated
No Integer Yes
Defines the amount of rows displayed.

If not defined, value of 4 is used.

tree

Generates a tree of nested items of which one or more may be selected, depending on the configuration. Produces a variable whose value is a Collection with the IDs of selected items as Strings.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the Collection value with the selected items' IDs within.
data

Required
Value type
EL-evaluated
Yes Map Yes
Defines the structure of the tree. The resolved value of this attribute is expected to be a Map of a specific kind. It is expected to contain Strings or Maps as values. Each entry in the map generates one node - the key defines the node's label, while the value defines what kind of node it is.

If the entry's value is a String, that map entry produces a leaf node, which is a selectable item. The value String becomes the node's ID (note that all such IDs must be unique across all trees in the form) that is delivered to the variable context if the item is selected at the time of submit.

If the entry's value is a Map, that map entry produces a node that can be clicked to reveal child nodes. The value Map defines the child nodes, and so should follow the same rules as the Map in which this entry itself was. The Map can then contain more Map values, making the tree even deeper - currently there is no specific limit to how many levels the tree can have.
multiselect

Required
Value type
EL-evaluated
No Boolean Yes
Defines if the tree is intended to allow multiple items to be selected. If the resolved value is true or the value is not defined, each item of the tree has a checkbox and any number of items may be selected. If the resolved value is anything else, there are no checkboxes and only one item may be selected.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the tree.

uploadFiles

Creates a component allowing the user to upload local files to the Dynamo server and then be used in the template logic. Produces a variable whose value is a Collection with the uploaded Files in it.

Attributes

var

Required
Value type
EL-evaluated
Yes String No
Defines the name of the variable that will hold the Collection value with the uploaded Files within.
title

Required
Value type
EL-evaluated
No String Yes
Defines a label for the component.

Comments

0 comments