Package gavo :: Package svcs :: Module customwidgets
[frames] | no frames]

Module customwidgets

source code

Nevow formal custom widgets used by the DC (enumerations, table options, etc)

Classes
  DBOptions
A widget that offers limit and sort options for db based cores.
  FormalDict
is a formal type for dictionaries.
  SimpleSelectChoice
  MultiSelectChoice
  StringFieldWithBlurb
is a text input widget with additional material at the side.
  NumericExpressionField
  DateExpressionField
  StringExpressionField
  ScalingTextArea
is a text area that scales with the width of the window.
  Interval
A widget to enter an interval (lower/upper) pair of something.
  ToFormalAdapter
Functions
 
EnumeratedWidget(ik)
is a widget factory for input keys over enumerated columns.
source code
 
makeWidgetFactory(code) source code
Variables
  __package__ = 'gavo.svcs'
Function Details

EnumeratedWidget(ik)

source code 

is a widget factory for input keys over enumerated columns.

This probably contains a bit too much magic, but let's see. The current rules are:

If values.multiOk is true, render a MultiSelectChoice, else render a SelectChoice or a RadioChoice depending on how many items there are.

If ik is not required, add an ANY key evaluating to None. For MultiSelectChoices we don't need this since for them, you can simply leave it all unselected.

If there is a default, it becomes the NoneOption.