Configuring Input Control Behavior

When defining text input controls, the default server behavior allows empty strings, even if you've configured a regular expression and made the input control mandatory. Use this setting to enforce the regular expression even on empty strings. This forces the user to provide a conforming value for the input control.

Input Control Behavior

Configuration File





The default value of false gives the traditional behavior: even if a regular expression is defined, it is not applied to empty strings.

If you want to strictly enforce the regular expression, even on empty input strings, set this property to true.

You can also configure the default value that appears in each type of input control. This is the value that is displayed when the input control is not given any value. By default, the display value is ~NULL~.

Edit the file .../WEB-INF/applicationContext-cascade.xml to change the following entries. The examples in comments show how you can use the default value to suggest a pattern for the input. To make an input control appear blank when no value is given, set value="" (an empty string).

<util:map id="globalDefaultValues" value-type="java.lang.String" key-type="java.lang.Byte">
    <!-- if DataType isn't defined-->
    <entry key="-1" value="~NULL~"></entry>
    <!--TYPE_TEXT = 1-->
    <!--<entry key="1" value="Enter value"></entry>-->
    <entry key="1" value="~NULL~"></entry>
    <!--TYPE_NUMBER = 2-->
    <!--<entry key="2" value="0"></entry>-->
    <entry key="2" value="~NULL~"></entry>
    <!--TYPE_DATE = 3-->
    <!--<entry key="3" value="2020-03-12"></entry>-->
    <entry key="3" value="~NULL~"></entry>
    <!--TYPE_DATE_TIME = 4-->
    <!--<entry key="4" value="2015-09-22T05:26:16"></entry>-->
    <entry key="4" value="~NULL~"></entry>
    <!--TYPE_TIME = 5-->
    <!--<entry key="5" value="13:37:54"></entry>-->
    <entry key="5" value="~NULL~"></entry>