[Zope] how: passing a list as a hidden variable from doc to doc

Thomas Weiner weiner@tu-harburg.de
Fri, 05 May 2000 15:22:36 +0200


Heiko Stoermer schrieb:

[...]

> I have to ask the user if he really wants to delete the files.
> Thus:
> select -> ask -> delete
> 
> So I need to pass the list of filenames through that darn "ask"
> document.
> There I did something like:
>         <input type=hidden name=del_list:list value="<dtml-var
> "REQUEST['del_list']">">
> this renders to:
>         <input type=hidden name=del_list:list value="['file1', 'file2',
> 'file3']">
> (Note: I did the :list type conversion. I also tried tokens, lines,
> whatever...)

Lists passing from REQUEST to REQUEST is a bit trickier. You have to
rebuild the list again. try (untested):

<dtml-in del_list>
 <input type=hidden name=del_list:list value="<dtml-var sequence-item>">
</dtml-in>

(and as a side effect you can give the user the possibility to check any
single file, which he had choosen)

hth,
Thomas
-- 
fon: ++49 (0)40 42878 3781
fax: ++49 (0)40 42878 2728