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

Class actual_widget

source code

 widget.actual_widget --+        
                        |        
xist_widget.actual_widget --+    
                            |    
         _input.actual_widget --+
                                |
                               text.actual_widget
Known Subclasses:
datetime_input.actual_widget, hidden.actual_widget, utext.actual_widget, textarea.actual_widget

Instance Methods [hide private]
  __init__(self, dbobj, dbproperty, empty_to_none, **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.
  value(self)
If the current request contains a value for our form element's name, return that value, otherwise get it from the dbobj.
  get_from_request(self, use_default=False)
Check the request for a parameter with this widget's name attribute.

Inherited from _input.actual_widget: widget

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


Class Variables [hide private]
  type = 'text'

Method Details [hide private]

__init__(self, dbobj, dbproperty, empty_to_none, **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)

value(self)

source code 
If the current request contains a value for our form element's name, return that value, otherwise get it from the dbobj. If that should fail, return the default.
Overrides: xist_widget.actual_widget.value
(inherited documentation)

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

Class Variable Details [hide private]

type

None
Value:
'text'