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

Class actual_widget

source code

 widget.actual_widget --+    
                        |    
xist_widget.actual_widget --+
                            |
                           checkbox.actual_widget

Instance Methods [hide private]
  widget(self, **kw)
Returns a xist frag that represents the HTML to create the widget.
  label(self, **lw)
  row(self, plone=False, error=None, **kw)
Return a row for an HTML form <div class="row"> <div class="label">self.title</div> <div class="help">self._help if non-null</div> <div class="error">error if non-null</div> <div class="field"> self.widget() </div> </div> @param plone: Set attributes so that this form may be used with CMFPlone`s JavaScript (unimplemented) @param error: Error message to be displayed along with the widget.
  value(self)
This assumes that forms set either submitted or form_submitted on submitb
  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__, __init__, error_message, help, set_from_request


Class Variables [hide private]
  type = 'checkbox'

Method Details [hide private]

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)

label(self, **lw)

source code 
Returns:
A html.div instance containing the widget's label (title attribute). The key word arguments will be added to the <div> as arguments. The css class defaults to 'label'
Overrides: xist_widget.actual_widget.label
(inherited documentation)

row(self, plone=False, error=None, **kw)

source code 

Return a row for an HTML form

<div class="row">
  <div class="label">self.title</div>
  <div class="help">self._help if non-null</div>
  <div class="error">error if non-null</div>

  <div class="field">
    self.widget()
  </div>
</div>

@param plone: Set attributes so that this form may be used with
  CMFPlone`s JavaScript (unimplemented)
@param error: Error message to be displayed along with the widget.

Overrides: xist_widget.actual_widget.row
(inherited documentation)

value(self)

source code 
This assumes that forms set either submitted or form_submitted on submitb
Overrides: xist_widget.actual_widget.value

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:
'checkbox'