[Zope] delete objet via a form

Steve Spicklemire steve@spvi.com
Sat, 8 Jul 2000 08:38:15 -0500 (EST)


This seems to work:

delete_form:
<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<FORM ACTION="delete" method="POST">
<dtml-in "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>

delete:
<dtml-var standard_html_header>
<dtml-call "manage_delObjects(ids)">
<dtml-call "RESPONSE.redirect('delete_form')">
<dtml-var standard_html_footer>

-steve
>>>>> "FR" == FR Chalaoux <chalaoux@cybercable.fr> writes:

    FR> Hi Zopper,

    FR> The Use case ==========

    FR> 1/ Display file objets from a folder

    FR> 2/ Select objets to delete

    FR> 3/ Delete these objets

    FR> 4/ Refresh the document

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

    FR> Help is welcome.

    FR> FR.

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

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







    FR> _______________________________________________ Zope maillist
    FR> - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope **
    FR> No cross posts or HTML encoding!  ** (Related lists -
    FR> http://lists.zope.org/mailman/listinfo/zope-announce
    FR> http://lists.zope.org/mailman/listinfo/zope-dev )