Thanks @darius but that does not seem to be the issue, this is the original (from Ebola example) problematic part:
"fields": [
{
"type": "obs",
"formFieldName": "obs.5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "Weight",
"widget": {
"providerName": "uicommons",
"fragmentId": "field/text",
"config": {
"min": "0.5",
"max": "199",
"appendToValueDisplayed": "kg"
}
},
"cssClasses": [ "number", "numeric-range" ]
}
]
I tried
Attempt 1 (as you suggested)
"fields": [
{
"type": "obs",
"formFieldName": "obs.5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "Weight",
"widget": {
"providerName": "uicommons",
"fragmentId": "field/text",
"config": {
"min": 0.5,
"max": 199,
"appendToValueDisplayed": "kg"
}
},
"cssClasses": [ "number", "numeric-range" ]
}
]
Attempt 2 (since the “config” subsection appeared to be missing when debugging, see my comments further below)
"fields": [
{
"type": "obs",
"formFieldName": "obs.5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "Weight",
"widget": {
"providerName": "uicommons",
"fragmentId": "field/text",
"min": "0.5",
"max": "199",
"appendToValueDisplayed": "kg"
},
"cssClasses": [ "number", "numeric-range" ]
}
]
Attempt 3 (just to be sure)
"fields": [
{
"type": "obs",
"formFieldName": "obs.5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "Weight",
"widget": {
"providerName": "uicommons",
"fragmentId": "field/text",
"min": 0.5,
"max": 199,
"appendToValueDisplayed": "kg"
},
"cssClasses": [ "number", "numeric-range" ]
}
]
… to no avail.
The reason why I got rid of the config subsection in my trials is because while debugging the UI Framework I saw that indeed the “min” and “max” where missing in the AttributeHolder instance that is checked by AttributeHolderUtil:satisfied(…).
This, however, works (since I get rid of the class that triggers the test on “min” and “max” presence):
"fields": [
{
"type": "obs",
"formFieldName": "obs.5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"label": "Weight",
"widget": {
"providerName": "uicommons",
"fragmentId": "field/text",
"config": {
"min": "0.5",
"max": "199",
"appendToValueDisplayed": "kg"
}
}
}
]
I don’t think I need this min/max feature currently so I’ll get on with my use case, but I though the whole above details could be useful to others.
I am sure I will need more help, so I’ll be around here or on IRC.
@mogoodrich would you have an example on hands showing how the address section could be extended?
Thanks anyhow for all the great help and tips so far.
Cheers.