Hi Peter,
Should <conditional> work with a checkbox (boolean) parameter?
I think the answer to my question is no one has every tried, because there are several things broken or not implemented here.
Yes, you are correct.
First, I think that <conditional> get_current_case method currently only works with parameters where get_initial_value returns strings. This prevents it working on check boxes (booleans), and I assume also numbers (integer and float paramters).
Second, the refresh_on_change="true" is only added to the HTML for select parameters (comboboxes/radio boxes), and not to checkboxes.
The attached patch tackles the above two issues - but given the remaining problem I don't expect it to be committed as is.
Thanks for the patch -- these appear to be necessary additions.
Third, having made sure refresh_on_change="true" is added to the HTML for checkboxes with dependencies, the refresh does not happen. This may be a JavaScript limitation? I've had a look at static/scripts/galaxy.base.js but it seems to only look for changes in comboboxes (?).
I think a whole new JS function is needed to watch changes to checkboxes with the refresh_on_change="true" attribute.
Am I on the right track? Would one of the main developers (who knows JavaScript) be able to make this work?
Yes, you are correct and are on the right track. It's straightforward to add JS support for refresh_on_change to a checkbox element. We'll look into this soon. Best, J.