FOCUS property
Checks whether an input component is focused
The expression <PROPERTY source='gadget' name='FOCUS'/> can be used in the area Value determination of the rule definition (or for the definition of a precondition) and checks whether an input component is focused by the editor, for example, by setting the cursor in a text input field or expanding a combo box. The expression returns a Boolean value.
Examples
Warning text appears in the form if the input component is focused
In this example, a warning text appears to the editor as soon as the editor focuses on the input component “st_text”. The FirstSpirit Framework in this case returns the expression <PROPERTY source="st_text" name="FOCUS"/> TRUE. So that the validation shows a rule violation and, at the same time, the warning text appears, the expression has to be negated within the value determination.
...
<RULE>
<WITH>
<NOT>
<PROPERTY source="st_text" name="FOCUS"/>
</NOT>
</WITH>
<DO>
<VALIDATION>
<PROPERTY source="st_text" name="VALID"/>
<MESSAGE lang="*" text="Type "Property""/>
<MESSAGE lang="DE" text="Typ "Property""/>
</VALIDATION>
</DO>
</RULE>
...
Additional examples: