csdms / wmt-client

A GWT client for the CSDMS Web Modeling Tool
MIT License
0 stars 0 forks source link

Add a new 'boolean' type which is rendered as a GWT checkbox #113

Open mdpiper opened 7 years ago

mdpiper commented 7 years ago

Currently, parameters that take on/off, true/false, or yes/no values are rendered using the "choice" type as a droplist containing the binary values. It would be preferable to display such parameters using a GWT CheckBox widget. This would require a new "logical" or "boolean" WMT parameter type. For example:

calculate_foo:
  description: Calculate foo?
  value:
    type: boolean
    default: 'No'
    choices:
      - 'Yes'  # the first value is the "checked" state
      - 'No'
mdpiper commented 7 years ago

I've been warned by @mcflugen to think about how to represent the default state of the button; e.g., should the first value in the list be the default? What corresponds to "on"?