Part of canonical.widgets.branch View In Hierarchy
The default branch for a new branch merge proposal should be the branch associated with the development focus series if there is one (that isn't an import branch).
Also in the initial radio button selector are other branches for the product that the branch owner has specified as target branches for other merge proposals.
Finally there is an "other" button that gets the user to use the normal branch selector.
Method | __init__ | Undocumented |
Method | hasInput | Is there any input for the widget. |
Method | getInputValue | Return the branch defined by the input value. |
Method | setRenderedValue | This widget does not support setting the value. |
Method | renderItems | Render the items for the selector. |
Method | __call__ | Don't render the radio buttons if only one choice. |
Method | _generateTargetVocab | Generate the vocabulary for the radio buttons. |
Method | _toFieldValue | Convert the form value into a branch. |
Method | _renderLabel | Render a label for the option with the specified index. |
Method | _renderBranchLabel | Render a label for the option based on a branch. |
Inherited from LaunchpadRadioWidget:
Method | _renderItem | Undocumented |
Method | _div | Undocumented |
The generated vocabulary contains the branch associated with the development series of the product if there is one, and also any other branches that the user has specified before as a target for a proposed merge.
If there were no radio button options, or 'other' was selected, then get the value from the branch widget, otherwise get the branch reference from the built up vocabulary.