Configuration Guide

Number Widget

Definition

There are two Widgets allowing to configure the display /edit of numbers (integer, decimal) attributes. 

  • Number Input Edit

  • Number Display

Number Input Edit

Number Display

image-20220928-075601.png


image-20220928-075608.png


Configuration

Properties

Properties name

Type

Mandatory

Description

Values (default value in bold)

Edit

Display

required

Boolean

NO

Defines if the attribute is mandatory or not.

true, false

check mark

cross mark

decimals

Integer

NO

Defines the authorized decimals of the attribute.


Only if the type = DECIMAL NUMBER

0, 1, 2, 3...

check mark

cross mark

forceStepDivisibility

String

NO

Used to specify how to force the value to be divisible by step

none, round, floor, ceil

check mark

cross mark

max

Integer

NO

Defines the maximum value that can be entered by the user.

If the indicated value is greater than the maximum value, by default, the maximum value will be indicated in the field.

0, 1, 2, 3...

check mark

cross mark

min

Integer

NO

Defines the minimum value that can be entered by the user.

If the indicated value is smaller than the minimum value, by default, the minimum value will be indicated in the field.

0, 1, 2, 3...

check mark

cross mark

suffix

String

NO

Defines a value after the field.

-

check mark

check mark

prefix

String

NO

Defines a value before the field.

-

check mark

check mark

step

Float

NO

Defines an increment/decrement value.

0.0

check mark

cross mark

verticalButtons

Boolean

NO

Allows to choose the display of the "plus" and "minus" buttons.

true, false

check mark

cross mark

verticalDownClass

String

NO

Defines the icon to display inside the button.
Link to find the icons : https://fontawesome.com/v4.7.0/icons/

fa fa-"name of the icon"

check mark

cross mark

verticalUpClass

String

NO

Defines the icon to display inside the button.
Link to find the icons : https://fontawesome.com/v4.7.0/icons/

fa fa-"name of the icon"

check mark

cross mark

backgroundColor

String

NO

Defines the displayed background color.

Standard CSS color value, #ffffff

cross mark

check mark

bold

Boolean

NO

Defines if the value is displayed in bold or not.

true, false

cross mark

check mark

fontSize

Enum

NO

Defines the displayed size.

INHERIT, XX_SMALL, X_SMALL, SMALL, MEDIUM, LARGE, X_LARGE, XX_LARGE

cross mark

check mark

italic

Boolean

NO

Defines if the value is displayed in italic or not.

true, false

cross mark

check mark

textAlign

Enum

NO

Defines where the text is aligned when displayed.

LEFT, CENTER, RIGHT

cross mark

check mark

textColor

String

NO

Defines the displayed text color.

Standard CSS color value, #000000

cross mark

check mark

underline

Boolean

NO

Defines if the value is underlined or not.

true, false

cross mark

check mark

Example

Number Input Edit

Number Display

XML
<widget id="level" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<editWidget xsi:type="ctdbum:NumberInputEditWidgetType">
            	<hidden>false</hidden>
                <config>
                    <required>false</required>
                    <decimals>0</decimals>
					<forceStepDivisibility>none</forceStepDivisibility>
                    <max>1200</max>
                    <min>0</min>
                    <suffix></suffix>
                    <prefix></prefix>
                    <step>1.0</step>
                    <verticalButtons>true</verticalButtons>
                    <verticalDownClass>glyphicon glyphicon-minus</verticalDownClass>
                    <verticalUpClass>glyphicon glyphicon-plus</verticalUpClass>
				</config>
			</editWidget>
		</editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ_WRITE</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>level</attributeId>
</widget>
XML
<widget id="createdat" xsi:type="ctdbum:AttributeEditorWidgetType">
	<hidden>false</hidden>
    <config>
    	<editor>
        	<displayWidget xsi:type="ctdbum:NumberDisplayWidgetType">
            	<hidden>false</hidden>
                <config>
                	<backgroundColor>#ffffff</backgroundColor>
                    <bold>false</bold>
                    <italic>false</italic>
                    <textAlign>LEFT</textAlign>
                    <textColor>#000000</textColor>
                    <underline>false</underline>
					<prefix></prefix>
					<suffix></suffix>
 				</config>
			</displayWidget>
		</editor>
        <label></label>
        <lockedInUi>false</lockedInUi>
        <mode>READ</mode>
        <multiValued>false</multiValued>
        <override>true</override>
	</config>
    <attributeId>createdat</attributeId>
</widget>
  • Features

    Design screens and business features to manage objects.