Re: Problem wiith dtml-sqltest variable and multiples values into one parametert ???

"Dieter Maurer" <[email protected]>
Newsgroups gmane.comp.web.zope.database
Message-ID <[email protected]>
CERETTO Thierry wrote at 2006-11-29 09:15 +0100:
> ...
>Also, I test with "test" tab of "Z SQL method", it's the same, when I
>put "f1" in parameter field, that's work but if I put "f1,f2" (list)
>that's doesn't work (I get message above) (alos I tried : "f1","f2" and
>'f1','f2', etc, etc, but without success)

"multiple" expects to get a sequence of objects
but HTML/HTTP handles only strings.

Either, you must use Python means to convert the string "f1, f2, ..."
into a list of strings (e.g. "str.split(', ')"),
or use ZPublisher magic (in this concrete case, the ":list" variable
suffix) to let ZPublisher perform the type conversion.

In your special case, using separate "hidden" fields (one for
each list element, all sharing the same name) may be sufficient
(as the ":list" is (almost) the default for this case).

You find a concise description of ZPublisher's magic suffixes in

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>




-- 
Dieter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.