Package turbogears :: Package widgets :: Module forms :: Class RepeatingFieldSet

Class RepeatingFieldSet

source code

         object --+                    
                  |                    
        base.Widget --+                
                      |                
    base.CompoundWidget --+            
                          |            
         object --+       |            
                  |       |            
        base.Widget --+   |            
                      |   |            
            InputWidget --+            
                          |            
        CompoundInputWidget --+        
                              |        
           RepeatingInputWidget --+    
                                  |    
     object --+                   |    
              |                   |    
    base.Widget --+               |    
                  |               |    
base.CompoundWidget --+           |    
                      |           |    
     object --+       |           |    
              |       |           |    
    base.Widget --+   |           |    
                  |   |           |    
        InputWidget --+           |    
                      |           |    
    CompoundInputWidget --+       |    
                          |       |    
        FormFieldsContainer --+   |    
                              |   |    
         object --+           |   |    
                  |           |   |    
        base.Widget --+       |   |    
                      |       |   |    
            InputWidget --+   |   |    
                          |   |   |    
                  FormField --+   |    
                              |   |    
              CompoundFormField --+    
                                  |    
                 RepeatingFormField --+
                                      |
                                     RepeatingFieldSet

Nested Classes

Inherited from base.Widget: __metaclass__

Instance Methods
 
update_params(self, d)
Update the template parameters.
source code

Inherited from RepeatingInputWidget: dictify_value, params_for, value_for

Inherited from FormFieldsContainer: display_field_for, get_field_by_name, render_field_for

Inherited from CompoundInputWidget: adjust_value, error_for

Inherited from base.CompoundWidget: __init__, display, iter_member_widgets, render, retrieve_css, retrieve_javascript

Inherited from base.Widget: __call__, __repr__, __setattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Class Variables
  template = '\n <div xmlns:py="http://genshi.edgewall.org/">...
hash(x)
  params = ['legend', 'repetitions', 'convert', 'disabled_fields...
  params_doc = {'convert': 'Should the value be coerced by the v...
  engine_name = 'genshi'
hash(x)
  legend = <turbogears.widgets.meta.ParamDescriptor object at 0x...
  template_c = <MarkupTemplate "None">

Inherited from RepeatingFormField: member_widgets

Inherited from RepeatingInputWidget: repeating, repetitions

Inherited from CompoundFormField: is_required

Inherited from FormFieldsContainer: disabled_fields, fields, hidden_fields

Inherited from base.CompoundWidget: compound

Inherited from FormField: css_classes, field_class, help_text, label

Inherited from InputWidget: convert, validator

Inherited from base.Widget: css, default, javascript

Properties

Inherited from FormFieldsContainer: file_upload

Inherited from FormField: field_id, name

Inherited from InputWidget: error, fq_name, is_validated, name_path, path

Inherited from base.Widget: is_named

Inherited from object: __class__

Method Details

update_params(self, d)

source code 

Update the template parameters.

This method will have the last chance to update the variables sent to the template for the specific request. All parameters listed at class attribute 'params' will be available at the 'params' dict this method receives.

*Must* call super(MyWidget, self).update_params(params) cooperatively, unless, of course, your know what you're doing. Preferably this should be done before any actual work is done in the method.

Overrides: base.Widget.update_params
(inherited documentation)

Class Variable Details

template

hash(x)

Value:
'''
    <div xmlns:py="http://genshi.edgewall.org/">
    <fieldset py:for="repetition in repetitions"
        class="${field_class}"
        id="${field_id}_${repetition}"
    >
        <legend py:if="legend[repetition]" py:content="legend[repetiti\
on]" />
...

params

Value:
['legend',
 'repetitions',
 'convert',
 'disabled_fields',
 'field_class',
 'css_classes']

params_doc

Value:
{'convert': 'Should the value be coerced by the validator at display?'\
,
 'css_classes': 'List of extra CSS classes for the field',
 'field_class': 'CSS class for the field',
 'legend': 'Text or list of texts to display as the legend for the fie\
ldset',
 'repetitions': 'Number of repetitions that should be rendered'}

legend

Value:
<turbogears.widgets.meta.ParamDescriptor object at 0x7f0d11fe32d0>