An HTML content command that can be used in screens to make an
input element able to modify the value of a Screen data variable. It can also be used in non-screen HTML to just display the value of that variable.
The primary attribute expression of this command is expected to refer to a Screen data variable. The host element's value will then be set to the resolved value of the expression. When the screen is submitted, the input's value at the time becomes the new value for whatever variable or property the primary attribute expression targets. Input elements of different types are suited for modifying String, Number, Boolean and Date values, so the primary attribute expression should resolve into a value of one of these types.
It is recommended that the host input element has a
type attribute with a value suited for the kind of value
bound-value is setting for it. For example, if
bound-value brings a Date value into the input, a type value of "date" would be a good match.
bound-value is evaluated in uneditable content (a composeContent command whose
editable attribute is
false does this), this content command's functionality changes. It will transform its host element into a
span and set its primary attribute's resolved value as the text content of that
span, in a fairly similar manner to how the HTML content command content would operate.
This command has a priority of 15 if evaluated in HTML content declared as uneditable. Otherwise its priority can be considered to be lower compared to all other HTML content commands besides
bound-repeat, which operates at a higher priority.
|This attribute can be used to link this |
When using this link, the primary attribute expression of
type attribute of the host input element undefined makes it a text input, which is generally not optimal for non-String value types. Some type values that might come useful are "number" and "date", for Number and Date values respectively.
<input bound-value="item.name"/> <input type="number" bound-value="item.quantity" /> <input type="date" bound-value="item.deliveryDate" />
For examples on the uses of the
bound-value-of-repeat attribute, please see the examples section of