Skip to main content
Version: 5.0.0

Criteria

A criterion is an input of a screen: it gets a value from the user and sends it to the server. Its component attribute selects the kind of input, and the rest of the attributes (label, placeholder, size, validation...) apply to all of them. Below is the real criterion of the AWE React client with the attributes they share: change them and the XML below follows. Type in it, too: it is a real field.

Live preview
XML
<criteria id="demo" component="text" label="Customer" />

The controls above write these attributes. The reference lists every attribute, its type and default. Attributes in the XSD reference

AttributeControlValues
componentComponenttextselectcheckbox
labelLabeltext
placeholderPlaceholdertext
iconIconlucide:userlucide:maillucide:searchlucide:calendar
sizeSizesmlg
validationRequiredtrue / false
readonlyRead onlytrue / false

Types of criteria​

Each family has its own page, with a playground that switches between its types:

hidden is not visible, so it has no playground: it carries a value to the server without showing it. The criteria reference describes every type.

Recipes​

A common field, rendered by the same component. The other recipes are on the page of each family.

Required field with icon​

validation="required" makes the field mandatory and the label shows it. The placeholder tells what to type and the icon goes in front of the input.

<criteria id="email" component="text" label="Email" placeholder="name@company.com" icon="lucide:mail" validation="required" />

Events and actions​

A criterion has no event of its own to listen to: every change of its value checks the dependencies whose dependency-element names it, and pressing Enter in a text field runs the submit button of its window. The actions that work on criteria:

ActionDescription
resetEmpties the value of the criterion
restorePuts back the initial value of the criterion
validateRuns the validation of the criterion and shows its error
set-invalidMarks the criterion as invalid with the message of the action
set-validClears the validation error of the criterion
copy-criterion-value-clipboardCopies the value of the criterion to the clipboard

More​