Roundup Tracker - Issues

Message4207

Author bruce
Recipients bruce
Date 2010-11-14.11:25:25
Message-id <1289733925.5.0.00781677957963.issue2550683@psf.upfronthosting.co.za>
In-reply-to
This is a request for a minor backward compatible change to the API and 
behaviour of indexargs_form (with the addition of one optional argument).

I have trackers where the index is filtered on form and session variables
which are maintained dynamically and independently of indexargs_form. For
this to work one must exclude all variables from the indexargs_form call
which are to be replaced with values that are derived from these other
variables, otherwise they will clash with the "hidden" form elements 
(which are automatically generated by indexargs_form itself).

The attached three line patch (against 1.4.16) implements this behaviour
by adding one extra argument (exclude) to indexargs_form. It is backward
compatible with the existing code and breaks nothing AFAIK.

This is an example of usage:

  <tal:block replace="structure python:request.indexargs_form(
                      sort=0,group=0,filter=0,columns=0,
                      exclude=['type','status','assignedto'])"/>

where the variables "type", "status" and "assignedto" are supplied via other
(visible) form input elements. Without the new exclude argument to indexargs_form,
all hidden input elements otherwise generated by this call would need to be 
manually added to the template code. Further, given that the template may not
know what other variables may be (dynamically) defined it may not even be 
possible to code this without some python helpers.

Does anyone have any objections to this behaviour being included in roundup?
History
Date User Action Args
2010-11-14 11:25:25brucesetrecipients: + bruce
2010-11-14 11:25:25brucesetmessageid: <1289733925.5.0.00781677957963.issue2550683@psf.upfronthosting.co.za>
2010-11-14 11:25:25brucelinkissue2550683 messages
2010-11-14 11:25:25brucecreate