-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.0
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
run the attached example choose-when-without-otherwise-ZK-3830.zul
choose "green" from the combobox
choose "red" from the combobox
choose "other" from the combobox
Current Result
green -> green button is rendered OK
red -> red button is rendered OK
other -> the previously rendered button remains
Expected Result
consistent behavior:
green -> green button
red -> red button
other -> no button at all
OR
in case <otherwise> is a mandatory element (for a technical reason) throw an exception to indicate incorrect usage
Debug Info
when setting the initial status value to anything other than red/green no button is rendered as expected.
Only when switching from a matching <when> block back to a non matching value the previous <when> block remains
Workaround
1) add an empty <otherwise/> element
2) surround the whole <choose> element with an <apply> to re-render the whole <choose> element and contents (like initial rendering)