[Zope] delete objet via a form

FR Chalaoux chalaoux@cybercable.fr
Fri, 07 Jul 2000 06:39:34 +0200


Hi Zopper,

The Use case
==========

1/ Display file objets from a folder

2/ Select objets to delete

3/ Delete these objets

4/ Refresh the document

My solution is based on 2 DTML methods but it does not work for me. The
documents are not deleted and no refresh of the page.

Help is welcome.

FR.

DTML Method  delete_form
====================
<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<FORM ACTION="http://localhost:8080/Common/Documents/delete"
method="POST">
<dtml-in "PARENTS[0].objectValues(['File'])" sort=id>
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<dtml-var id>"> <dtml-var
id><p>
</dtml-in>
<INPUT TYPE="SUBMIT">
</form>
<dtml-var standard_html_footer>

DTML Method delete
===============
<dtml-call "manage_delObjects(REQUEST['ids'])">
<dtml-call "RESPONSE.redirect(URL1 + '/delete_form')">