Skip to content

Uno Choice Cascade Dynamic Choice Parameter

Bruno P. Kinoshita edited this page May 19, 2014 · 1 revision

Uno-Choice Cascade Dynamic Choice Parameter

This parameter has the same features as the Uno-Choice Dynamic Choice Parameter, but with the cascading feature. This feature enables this plug-in to be re-rendered once one of its referenced parameters are changed (clicked, selected).

if (binding.variables.get('Gender') != null) {
  gender = binding.variables.get('Gender')
  if (gender == 'Male')
    return ['Waiter', 'Actor', 'Usher']
  else
    return ['Waitress', 'Actress', 'Usherette']
} else {
  return []
}

You have to provide a comma separeted list of referenced parameters. These parameters must be present in the UI. Your Uno-Choice Cascade Dynamic Choice Parameter will look for each referenced parameter and will register an event listener. Once the referenced parameter changes, its name and value will be passed to the Groovy script as variables, and the script will be re-rendered. Finally, the options will be updated.