Package turbogears :: Package widgets :: Module links :: Class JumpMenu

Class JumpMenu

source code

   object --+                
            |                
  base.Widget --+            
                |            
forms.InputWidget --+        
                    |        
      forms.FormField --+    
                        |    
     forms.SelectionField --+
                            |
                           JumpMenu

A widget for a select field to choose a destination link.

Choose a link from the menu and the page will be redirected to the selected link.

Nested Classes
  template_c

Inherited from base.Widget: __metaclass__

Instance Methods

Inherited from forms.SelectionField: __init__, update_params

Inherited from forms.InputWidget: adjust_value, display

Inherited from base.Widget: __call__, __repr__, __setattr__, render, retrieve_css, retrieve_javascript

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

Class Variables
  js = JSSource(name='widget', defer=False, src='\n <!--\n ...
  template = '\n <select xmlns:py="http://purl.org/kid/ns#"\n...
hash(x)
  javascript = [JSSource(name='widget', defer=False, src='\n ...
  params = ['attrs', 'options', 'field_class', 'css_classes', 'c...
  params_doc = {'attrs': 'Dictionary containing extra (X)HTML at...
  attrs = {}

Inherited from forms.SelectionField: convert, no_input_if_empty, options

Inherited from forms.FormField: css_classes, field_class, help_text, label

Inherited from forms.InputWidget: validator

Inherited from base.Widget: css, default

Properties

Inherited from forms.FormField: field_id, is_required, name

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

Inherited from base.Widget: is_named

Inherited from object: __class__

Class Variable Details

js

Value:
JSSource(name='widget', defer=False, src='\n    <!--\n    function TG_\
jumpMenu(targ,f,restore){\n      eval(targ+".location=\'"+f.options[f.\
selectedIndex].value+"\'");\n      if (restore) f.selectedIndex=0;\n  \
  }\n    //-->\n    ', order=0)

template

hash(x)

Value:
'''
    <select xmlns:py="http://purl.org/kid/ns#"
        name="${name}"
        class="${field_class}"
        id="${field_id}"
        onchange="TG_jumpMenu(\'parent\',this,0)"
        py:attrs="attrs"
    >
...

javascript

Value:
[JSSource(name='widget', defer=False, src='\n    <!--\n    function TG\
_jumpMenu(targ,f,restore){\n      eval(targ+".location=\'"+f.options[f\
.selectedIndex].value+"\'");\n      if (restore) f.selectedIndex=0;\n \
   }\n    //-->\n    ', order=0)]

params

Value:
['attrs', 'options', 'field_class', 'css_classes', 'convert']

params_doc

Value:
{'attrs': 'Dictionary containing extra (X)HTML attributes for the sele\
ct tag',
 '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',
 'options': 'A list of tuples with the options for the selectfield'}