Hi Mat
Betreff: Re: AW: [Zope-dev] z3c.form SequenceWIdget extract
[...]
Hi Roger,
I am sorry, but I was not clear enough with my description:
In my search-form, I have a simple single-select-widget (i.e. a dropdown). My problem is not to transmit multiple values for a single widget over a GET-paramter-string - for this, your solution should work. But I want to use the key and value of this dropdown-widget just the same way as for input-widgets: I want to be able to build a query-string like
search.html?form.widgets.dropdown=foo
and have the SequenceWidget accept this single value. Currently, SequenceWidget depends on the fact, that in the templates for sequence-widgets, the name of the widget gets a postfix of ":list" (so "form.widgets.dropdown" is now "form.widgets.dropdown:list") and because of that, the value is transformed to a list by zope.publisher.browser.BrowserRequest.
I see
But because the method in my application that builds the query-string has no knowledge about the widget-types - it simple has key-value-pairs - it can not append the ":list" postfix to the paramter name, thus the value is not transformed to a list and SequenceWidget disregards the value altogether.
With the two additional lines, SequenceWidget does not assume anymore, that value has already been transformed to a list (a bold assumtion as I think, since it depends on the default templates) and it will accept query-strings of the given form.
Ok, I got it, I think you are right. Stephan, any hints? Regards Roger Ineichen
Regards,
Mat