l.b.b.w.b.BugTaskBugWatchWidget(RadioWidget) : class documentation

Part of lp.bugs.browser.widgets.bugtask View In Hierarchy

A widget for linking a bug watch to a bug task.
Method __init__ Undocumented
Method setUpJavascript Set up JS to select the "new bugwatch" option automatically.
Method setPrefix Undocumented
Method renderItems Render the items with with the correct radio button selected.
Method renderItem Render an item.
Method renderSelectedItem Render a selected item.
Method renderValue Render the widget with the selected value.
Method _toFieldValue Convert the textual token to a field value.
Method _getFormValue Return the form value.
Method _div Don't render a div tag.
Method _joinButtonToMessage Join the input tag with the label.
def __init__(self, field, vocabulary, request):
Undocumented
def setUpJavascript(self):
Set up JS to select the "new bugwatch" option automatically.
def setPrefix(self, prefix):
Undocumented
def _toFieldValue(self, form_value):
Convert the textual token to a field value.

If the form value is _new_bugwatch_value, create a new bug watch, otherwise look up an existing one.

def _getFormValue(self):
Return the form value.

We have to override this method in this class since the original one uses getInputValue(), which it shouldn't do.

def _div(self, cssClass, contents, **kw):
Don't render a div tag.
def _joinButtonToMessage(self, option_tag, label, input_id):
Join the input tag with the label.
def renderItems(self, value):
Render the items with with the correct radio button selected.
def renderItem(self, index, text, value, name, cssClass):
Render an item.

We override this method to use the _joinButtonToMessage method instead of the _joinButtonToMessageTemplate which doesn't have access to the id.

def renderSelectedItem(self, index, text, value, name, cssClass):
Render a selected item.

We override this method to use the _joinButtonToMessage method instead of the _joinButtonToMessageTemplate which doesn't have access to the id.

def renderValue(self, value):
Render the widget with the selected value.

The original renderValue separates the items with either '&nbsp;' or '<br />' which isn't suitable for us.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.