Configuring Input Control Behavior

When defining text input controls, the default server behavior allows empty strings, even if you have 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

.../WEB-INF/applicationContext-cascade.xml

Bean

Description

applyRegexpToEmptyString

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>
</util:map>

Configuring Case Sensitivity

You can configure the following property to turn on/off the case sensitivity for input control behavior.

Configuring the Case Sensitivity for Input Control Behavior

Configuration File

.../WEB-INF/js.config.properties

Property

Description

inputControl.handler.values.caseSensitive

 

This property is used to set input control or filter values to case insensitivity for case-insensitive databases.

By default, the value is inputControl.handler.values.caseSensitive=true. You can set this property to false to ignore case sensitivity.

When set to false, the parameters or input controls validator becomes case insensitive.

For example, if inputControl.handler.values.caseSensitive=true providing country="usa" triggers a validation exception.

However, if inputControl.handler.values.caseSensitive=false

providing any of the following values is acceptable:

country="USA"
country="UsA"
country="usa"

Note: The parameter caseSensitive is also added to the existing JSON model for ExistingFilters (DynamicFilterObject) in Crosstab/Table Model.