durusmail: qp: SelectWidget key generation
SelectWidget key generation
2006-12-04
2006-12-04
2006-12-04
2006-12-04
2006-12-04
2006-12-04
2006-12-04
2006-12-04
2006-12-05
SelectWidget key generation
David Binger
2006-12-04
On Dec 4, 2006, at 8:06 AM, David K. Hess wrote:

>
> I have an "action" page with a form where I can act on an object
> selected from a SingleSelectWidget. I also have a "home" page for
> viewing one of those objects. On the "home" page, I have a form
> with a HiddenWidget with the same name as the "action" page's
> SingleSelectWidget with the key value for that object in it. Then I
> post the form from the "home" page to the "action" page (such that
> form.get_submit() == True) to preselect the correct object in the
> SingleSelectWidget.
>
> I could name the HiddenWidget separately from the
> SingleSelectWidget and do this default select by hand but this
> seems to work well (though maybe a bit unorthodox).

I'm not sure if I really understand what you are doing, but I
guess our normal pattern for this would be to use a component of
the URL, instead of a hidden value, to identify the particular
instance.  (As far as I know, your way is fine.)

I don't understand how your patch makes something easier.


reply