Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 25
Next »
The number inputs lets the user provide a number.
Decimal
Decimal inputs only lets the end-user type decimal numbers.
In syntax check mode
api.inputBuilderFactory()
.createUserEntry('decimal')
.getInput()
In header Logics
processor.addOrUpdateInput(
'ROOT',
api.inputBuilderFactory()
.createUserEntry('decimal')
.buildMap()
)
In forms (Configurators)
def formSection = api.createConfiguratorEntry()
formSection.setInputs([
api.inputBuilderFactory()
.createUserEntry('decimal')
.buildContextParameter()
])
return formSection
Reading input value
def value = input.decimal as BigDecimal
Integer
Integer inputs only lets the end-user provide integers:
In syntax check mode
api.inputBuilderFactory()
.createIntegerUserEntry('integer', )
.getInput()
In header Logics
processor.addOrUpdateInput(
'ROOT',
api.inputBuilderFactory()
.createIntegerUserEntry('integer')
.buildMap()
)
In forms (Configurators)
def formSection = api.createConfiguratorEntry()
formSection.setInputs([
api.inputBuilderFactory()
.createIntegerUserEntry('integer')
.buildContextParameter()
])
return formSection
Reading input value
def value = input.integer as Integer
Minimum and Maximum Values
You can restrict the set of values that the end-user can provide to the input, by using the setMin()
and setMax()
methods:
api.inputBuilderFactory()
.createIntegerUserEntry('NaturalNumber')
.setMin(0)
.getInput()