/ widget.py / pwDoubleSelectorInput
- Double selector widget class
- This is a very complicated widget that is a combination
of two multiple selection widgets. One selection widget presents the list of options,
and the second widget presents the selected options. Users can "move" options between
the two lists using "Append" and "Remove" buttons.
Approach: a double selector is made up of 6 widgets: two multiple selectors and
and 5 buttons (Append, Remove, New, Delete, and Edit). There are two possible
layout approaches:
- 1) Full css
- rely exclusively on css to all styling. This works very
well for standards-compliant browsers (firefox,mozilla,safari) but does
not work at all for IE because there is no way to center things vertically
- 2) Table+
- rely on tables for the basic positioning, but use css for all
other styling.
Arguments:
- obj: the object that contains the attribute associated with this field
- attr: the name of the attribute
- availList: the list of values that are available for selection, organized as a list of name,value tuples
Common Keywords:
- divClass: allows the user to override the class of the
- fieldSpecial: allows the user to add "special" HTML attributes to the output element
- id: overrides the HTML "id" attribute
- selectable: controls whether this field is selectable or not
- inputType: mostly for internal use -- overrides the type designation in the output hidden fields
Keywords:
- customEdit: a custom "Edit" button. Custom buttons are organized as python dictionaries and may have
the following values:
+ label: overrides the default label for the button
+ name: the name of the button
+ value: the value for the button
+ onclick: the javascript action to take when the button is selected
if the value of a custom button is "None", then the button will not be displayed
- customDelete: a custom "Delete" button.
- customNew: a custom "New" button
- layout: the layout style for this widget (table vs. css)
Default divClass: pwDoubleSelectorInput
Methods
|
|
|
customButton
|
customButton (
self,
custom,
label,
onclick,
**kwlist,
)
|
|
__init__
|
__init__ (
self,
obj,
attr,
availList,
**kwlist,
)
|
|
display
|
display ( self, lvl )
|
|
|