gavo.formal.widgets.multiselect module

class gavo.formal.widgets.multiselect.MultichoiceBase(original, options=None, noneOption=<object object>)[source]

Bases: object

A base class for widgets that provide the UI to select one or more items from a list.

Based on ChoiceBase

options:

A sequence of objects adaptable to IKey and ILabel. IKey is used as the <option>’s value attribute; ILabel is used as the <option>’s child. IKey and ILabel adapters for tuple are provided.

noneOption:

An object adaptable to IKey and ILabel that is used to identify when nothing has been selected. Defaults to (‘’, ‘’)

default can be whitespace-separated items.

noneOption = None
options = None
processInput(request, key, args, default='')[source]
class gavo.formal.widgets.multiselect.MultiselectChoice(original, options=None, noneOption=<object object>)[source]

Bases: MultichoiceBase

A drop-down list of options.

noneOption = ('', '')
render(request, key, args, errors)[source]
renderImmutable(request, key, args, errors)[source]