applyBox() function
Creates a container for displaying icons and messages.
Syntax
applyBox()applyBox(stateValues)applyBox(effectID, stateValues)applyBox(htmlElement, effectID, stateValues)applyBox(effectID, htmlElement, stateValues)applyBox(effectID, stateValues, htmlElement)applyBox(htmlElement, stateValues, effectID)applyBox(stateValues, htmlElement, effectID)applyBox(stateValues, effectID, htmlElement)Parameters
-
htmlElementoptional
An object that implements theHTMLElementinterface.
Default:undefined. -
effectIDoptional
A string identifier of the effect.
Default: A unique string value for each function call. -
stateValuesoptional
An object that specifies values for validity states. The available properties are:-
trueoptional
An object with properties for the validity state equal totrue. The available properties are:-
delayoptional
A number in milliseconds for the effect to be deferred for this validity state.
Default:0. -
valueoptional
The content to be placed inside the container for this validity state. Can be a string, font icons, any valid HTML or SVG content, or a renderer function which accepts aValidationResultand returns any kind of the mentioned content.
Default: an empty string''.
-
-
falseoptional
An object with properties for the validity state equal tofalse. The available properties are:-
delayoptional
A number in milliseconds for the effect to be deferred for this validity state.
Default:0. -
valueoptional
The content to be placed inside the container for this validity state. Can be a string, font icons, any valid HTML or SVG content, or a renderer function which accepts aValidationResultand returns any kind of the mentioned content.
Default: an empty string''.
-
-
modeoptional
Sizing mode of the container.
Default:'MIN_SIDE'. -
positionoptional
Positioning mode of the container.
Default:'LEVEL_RIGHT_BESIDE'. -
styleoptional
Additional styles for the container.
Default:undefined.
-
Return value
An Array with two functions:
- A function for cancellation the effect if it is deffered.
- A function for setting the effect.
Both functions accept the following arguments:
validationResult
AValidationResultobject.
Exceptions
See exceptions of the function returned by the createApplyEffect() function.
Description
This function was created with using createApplyEffect().
See the description of applyEffect(), cancelEffect(), setEffect() on the createApplyEffect() function page.
Implementation: apply-box.js.