Ticket #376 (closed defect: fixed)
Multivalue selection-control problems
|Reported by:||sdm||Owned by:||mpo|
Description (last modified by sdm) (diff)
I discovered 2 problems when using a multivalue selection-control:
1) Error on empty selection:
- If you select a value and then deselect it again so that nothing is
selected anymore, I get the following error: "Formatting error
TypeError?: val is null"
2) Inconsistent JSON data when only one value is selected:
- If the control is not nullable, the first option is selected by
default. If you post the form, the value is sent like this: "2"
- If you select another option and then reselect the first option,
then the value that is sent after form submission is [ "2" ] (it should
probably always send an array with one value).
I think it would also be better if no value was selected by default.
For a regular "one value" selection-control, you always have to select
a value (even if that value is nothing more than "Please select an
option"), so it's logical in this case that the first value is
automatically selected, but for a multivalue selection-control, it's
also possible to select nothing, so I think that it's not necessary to
select the first option by default.
+ if nothing was selected by default, problem 2) would probably also
I've added a patch to solve the default selection problem.
- Status changed from closed to reopened
- Resolution fixed deleted