[Zope] Multiple values

Dieter Maurer dieter@handshake.de
Wed, 19 Feb 2003 21:00:47 +0100


Norlin Abd Rahim wrote at 2003-2-19 17:22 +0800:
 > I'm trying to update multiple values in one form at one time. In the 
 > first form i've put something like this:
 > 
 > <dtml-in sqlquery>
 >    <input type=text name=ab:list value=<dtml-var x>>
 >    <inpu type=text name=cd:list value=<dtml-var y>>
 > </dtml-in>
 > 
 > and I've sent the lists to another page that contains something like this:
 >     <dtml-in "map(None,ab,cd)">
 >       <dtml-call  "sqlUpdate(i=sequence_item[0],j=sequence_item[1])">
 >      </dtml-in>
 > 
 > but its not working....

You should never only say "its not working".

We need to learn in what way it is not working ("Error Type", "Error Value"
and traceback, in case of an exeption).

That said, your problem is probably simple:

  Almost surely, a "prefix=sequence" is missing in your second
  "dtml-in".

  Furthermore, "dtml-in" treats pairs (such as those created
  by "map(None,l1,l2)" in a special way: it splits them
  into "key" and "item". Therefore "sequence_item" is not
  a pair in the case, but the second pair component.
  "sequence_key" gives the first one.
  This discussion assumes a "prefix=sequence" attribute on
  "dtml-in".


Dieter