Package s3 :: Module s3filter :: Class S3OptionsFilter
[frames] | no frames]

Class S3OptionsFilter

source code

    object --+    
             |    
S3FilterWidget --+
                 |
                S3OptionsFilter


Options filter widget

Configuration options:

** Widget appearance:

@keyword label: label for the widget
@keyword comment: comment for the widget
@keyword hidden: render widget initially hidden (="advanced" option)
@keyword widget: widget to use:
                 "select", "multiselect" (default), or "groupedopts"
@keyword no_opts: text to show if no options available

** Options-lookup:

@keyword resource: alternative resource to look up options
@keyword lookup: field in the alternative resource to look up
@keyword options: fixed set of options (of {value: label} or
                  a callable that returns one)

** Options-representation:

@keyword represent: custom represent for looked-up options
                    (overrides field representation method)
@keyword translate: translate the option labels in the fixed set
                    (looked-up option sets will use the
                    field representation method instead)
@keyword none: label for explicit None-option in many-to-many fields

** multiselect-specific options:

@keyword search: show search-field to search for options
@keyword header: show header with bulk-actions
@keyword selectedList: number of selected items to show on
                       button before collapsing into number of items

** groupedopts-specific options:

@keyword cols: number of columns of checkboxes
@keyword size: maximum size of multi-letter options groups
@keyword help_field: field in the referenced table to display on
                     hovering over a foreign key option

Instance Methods
 
widget(self, resource, values)
Render this widget as HTML helper object(s)
source code
 
ajax_options(self, resource)
Method to Ajax-retrieve the current options of this widget
source code

Inherited from S3FilterWidget: __call__, __init__, data_element, variable

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

Class Variables
  operator = "belongs"
  alternatives = ["anyof", "contains"]
Properties

Inherited from object: __class__

Method Details

widget(self, resource, values)

source code 

Render this widget as HTML helper object(s)

Parameters:
  • resource - the resource
  • values - the search values from the URL query
Overrides: S3FilterWidget.widget

ajax_options(self, resource)

source code 

Method to Ajax-retrieve the current options of this widget

Parameters:
  • resource - the S3Resource

Class Variable Details

operator

Value:
"belongs"

alternatives

Value:
["anyof", "contains"]