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.

Instance Methods

Inherited from forms.SelectionField: __init__, update_params

Inherited from forms.FormField: field_id, is_required

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

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

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

Class Variables
  js = JSSource(...
  template = ...
hash(x)
  javascript = [js]
  params = ["attrs"]
  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, name

Inherited from forms.InputWidget: validator

Inherited from base.Widget: __metaclass__, css, default, engine_name

Properties

Inherited from object: __class__

Class Variable Details

js

Value:
JSSource("""
    <!--
    function TG_jumpMenu(targ,f,restore){
      eval(targ+".location='"+f.options[f.selectedIndex].value+"'");
      if (restore) f.selectedIndex=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"
    >
...

params_doc

Value:
{'attrs': 'Dictionary containing extra (X)HTML attributes for' ' the s\
elect tag'}