Package turbogears :: Package widgets :: Module forms :: Class FormFieldsContainer

Class FormFieldsContainer

source code

     object --+            
              |            
    base.Widget --+        
                  |        
base.CompoundWidget --+    
                      |    
     object --+       |    
              |       |    
    base.Widget --+   |    
                  |   |    
        InputWidget --+    
                      |    
    CompoundInputWidget --+
                          |
                         FormFieldsContainer

A container for FormFields.

Has two member_widgets lists:

It provides the template with 3 useful functions:

Instance Methods
 
file_upload(self) source code
 
get_field_by_name(self, name, default=None) source code
 
display_field_for(self, item, value=None, **params) source code
 
render_field_for(self, item, value=None, format="html", **params) source code
 
update_params(self, d)
Update the template parameters.
source code

Inherited from CompoundInputWidget: adjust_value, dictify_value, error_for, params_for, value_for

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

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

Inherited from base.Widget: __call__, __repr__, __setattr__, is_named

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

Class Variables
  member_widgets = ["fields", "hidden_fields"]
  fields = []
  hidden_fields = []
  params = ["disabled_fields"]
  disabled_fields = set()

Inherited from base.CompoundWidget: compound

Inherited from InputWidget: convert, params_doc, validator

Inherited from base.Widget: __metaclass__, css, default, engine_name, javascript, name, template

Properties

Inherited from object: __class__

Method Details

file_upload(self)

source code 
Decorators:
  • @property

display_field_for(self, item, value=None, **params)

source code 
Decorators:
  • @retrieve_field_for

render_field_for(self, item, value=None, format="html", **params)

source code 
Decorators:
  • @retrieve_field_for

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)