Changes between Version 15 and Version 16 of S3/FilterForms


Ignore:
Timestamp:
03/27/13 10:25:36 (12 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/FilterForms

    v15 v16  
    2626=== General ===
    2727
    28   * tbw
     28All filter widgets are subclasses of the S3FilterWidget class.
    2929
     30For the configuration, a widget instance is created like:
     31
     32{{{
     33instance = S3FilterWidget(field=None, **attr)
     34}}}
     35
     36  - '''field''' is the field selector (list of field selectors) for the field(s) to filter by (required)
     37  - '''attr''' are keyword attributes for the widget, where those starting with an underscore are the HTML attributes, while all others are widget options (see the particular widget for details)
     38
     39The widget is then rendered by calling it:
     40
     41{{{
     42widget = instance(resource, get_vars=None, alias=None)
     43}}}
     44
     45  - '''resource''' is the resource to filter (required)
     46  - '''get_vars''' is the dict of GET vars from the previous request (used to populate the widget, required but can be empty)
     47  - '''alias''' is the component alias to use for the URL query (optional, needed if ''resource'' is not the master resource of the request)
    3048=== S3TextFilter ===
    3149