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

Class S3FilterWidget

source code

object --+
         |
        S3FilterWidget

Filter widget for interactive search forms (base class)

Instance Methods
 
widget(self, resource, values)
Prototype method to render this widget as an instance of a web2py HTML helper class, to be implemented by subclasses.
source code
 
variable(self, resource, get_vars=None)
Prototype method to generate the name for the URL query variable for this widget, can be overwritten in subclasses.
source code
 
data_element(self, variable)
Prototype method to construct the hidden element that holds the URL query term corresponding to an input element in the widget.
source code
 
__init__(self, field=None, **attr)
Constructor to configure the widget
source code
 
__call__(self, resource, get_vars=None, alias=None)
Entry point for the form builder
source code

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

Class Variables
  operator = None
  alternatives = None
Properties

Inherited from object: __class__

Method Details

widget(self, resource, values)

source code 

Prototype method to render this widget as an instance of a web2py HTML helper class, to be implemented by subclasses.

Parameters:
  • resource - the S3Resource to render with widget for
  • values - the values for this widget from the URL query

variable(self, resource, get_vars=None)

source code 

Prototype method to generate the name for the URL query variable for this widget, can be overwritten in subclasses.

Parameters:
  • resource - the resource
Returns:
the URL query variable name (or list of variable names if there are multiple operators)

data_element(self, variable)

source code 

Prototype method to construct the hidden element that holds the URL query term corresponding to an input element in the widget.

Parameters:
  • variable - the URL query variable

__init__(self, field=None, **attr)
(Constructor)

source code 

Constructor to configure the widget

@param field: the selector(s) for the field(s) to filter by
@param attr: configuration options for this widget

Common configuration options:

@keyword label: label for the widget
@keyword comment: comment for the widget
@keyword hidden: render widget initially hidden
                 (="advanced" option)

- other options see subclasses

Overrides: object.__init__

__call__(self, resource, get_vars=None, alias=None)
(Call operator)

source code 

Entry point for the form builder

Parameters:
  • resource - the S3Resource to render the widget for
  • get_vars - the GET vars (URL query vars) to prepopulate the widget
  • alias - the resource alias to use

Class Variable Details

operator

Value:
None

alternatives

Value:
None