Package orm2 :: Package ui :: Package xist :: Module widgets :: Class mapping_select :: Class actual_widget
[hide private]
[frames] | no frames]

Class actual_widget

source code

 widget.actual_widget --+    
                        |    
xist_widget.actual_widget --+
                            |
                           mapping_select.actual_widget

Instance Methods [hide private]
  __init__(self, dbobj, dbproperty, mapping, sort, size, multiple, multiple_separator, **kw)
@param dbobj: The dbobj whoes property is to be displayed by this widget @param errors: Dict that contains the error messages from the last commit.
  widget(self, **kw)
Returns a xist frag that represents the HTML to create the widget.
  mapping(self)
  get_from_request(self, use_default=False)
Check the request for a parameter with this widget's name attribute.

Inherited from xist_widget.actual_widget: __getattr__, error_message, help, label, row, set_from_request, value


Method Details [hide private]

__init__(self, dbobj, dbproperty, mapping, sort, size, multiple, multiple_separator, **kw)
(Constructor)

source code 

@param dbobj: The dbobj whoes property is to be displayed by this
  widget
@param errors: Dict that contains the error messages from the last
  commit.
@param name: The name attribute of the HTML <input> (or so) element
  that will be created by this. Defaults to dbclass.attribute,
  which will do for most circumstances... A regular String.
@param title: Will overwrite the datatype.title attribute for the
  widget's caption. Unicode string required.
@param help: Help text that will be displayed along with the
  widget. May be a XIST element, of course, but you may not want
  to use block level elements in it.
@param default: Unicode String or other Python object suitable  to
  determine the default setting for this widget if dbobj is None
  (see widget() below)

The key word arguments may be used to pass arbitrary
attributes to the widget element.

Overrides: xist_widget.actual_widget.__init__
(inherited documentation)

widget(self, **kw)

source code 
Returns a xist frag that represents the HTML to create the widget. Ideally this is a single HTML element. The key word arguments will be passed as attributes, overwriting the constructor's key word arguments (see above).
Overrides: xist_widget.actual_widget.widget
(inherited documentation)

mapping(self)

source code 
None

get_from_request(self, use_default=False)

source code 
Check the request for a parameter with this widget's name attribute. It it is set return it as is. Otherwise return the default value (if use_default is True) or raise KeyError.
Overrides: xist_widget.actual_widget.get_from_request
(inherited documentation)