# HG changeset patch # User Adrien Di Mascio # Date 1234947838 -3600 # Node ID 0c0dfd33a76d1dbfa71d9d31dc3873f1683fb622 # Parent 01740274e7742a9d37593148ad8ef27245a2d2f3 instantiate selectors wherever needed diff -r 01740274e774 -r 0c0dfd33a76d web/form.py --- a/web/form.py Wed Feb 18 10:03:26 2009 +0100 +++ b/web/form.py Wed Feb 18 10:03:58 2009 +0100 @@ -239,9 +239,7 @@ should list necessary parameters in the form to be accepted. """ __registerer__ = accepts_registerer - __select__ = classmethod(match_form_params) - - form_params = () + __select__ = match_form_params() class EntityForm(FormMixIn, EntityView): """base class for forms applying on an entity (i.e. uniform result set) diff -r 01740274e774 -r 0c0dfd33a76d web/views/basecomponents.py --- a/web/views/basecomponents.py Wed Feb 18 10:03:26 2009 +0100 +++ b/web/views/basecomponents.py Wed Feb 18 10:03:58 2009 +0100 @@ -194,8 +194,8 @@ to be able to filter accordingly. """ id = 'etypenavigation' - __select__ = classmethod(chainfirst(two_etypes_rset, match_form_params)) - form_params = ('__restrtype', '__restrtypes', '__restrrql') + __select__ = two_etypes_rset() | match_form_params('__restrtype', '__restrtypes', + '__restrrql') visible = False # disabled by default def call(self): diff -r 01740274e774 -r 0c0dfd33a76d web/views/baseviews.py --- a/web/views/baseviews.py Wed Feb 18 10:03:26 2009 +0100 +++ b/web/views/baseviews.py Wed Feb 18 10:03:58 2009 +0100 @@ -35,7 +35,7 @@ class NullView(AnyRsetView): """default view when no result has been found""" id = 'null' - __select__ = classmethod(yes) + __select__ = yes() def call(self, **kwargs): pass cell_call = call diff -r 01740274e774 -r 0c0dfd33a76d web/views/facets.py --- a/web/views/facets.py Wed Feb 18 10:03:26 2009 +0100 +++ b/web/views/facets.py Wed Feb 18 10:03:58 2009 +0100 @@ -30,8 +30,8 @@ """filter results of a query""" id = 'filter_box' __select__ = (((non_final_entity() & two_lines_rset()) - | contextview_selector - ) & match_context_prop) + | contextview_selector() + ) & match_context_prop()) context = 'left' title = _('boxes_filter_box') visible = True # functionality provided by the search box by default