[Zope] Acquistion in a form
David Kyte
david.kyte@microamps.com
Thu, 29 Mar 2001 10:19:52 +0100
Hi ZopeGODS,
I am happy and understand acquisition when applied to
acquiring objects above the current directory. I have
an application that manipulates lists
/Mgr
/RenameDocID
/Rename
/Delete
/Lists
/List1
/List2
/List....
I have succesfully implemented tools like Rename, Delete,
New that create and manipultate lists is the Lists
directory.
However being a tidy minded sort of programmer, my Mgr
folder is starting to get bloated - I do hate scrolling :(
I thought it might be a good idea to include the tools in
a Tool folder
ie
/Mgr
/Tools
/RenameDocID
/Rename
/Delete
/Lists
/List1
/List2
/List....
I can call the Rename method using
<dtml-var "Tools.RenameDocID( _.None, _)"> fine.
Problem arises that my rename process is to parts,
I call RenameDocID which has a form to display
the oldname and capture the new name. How can I then
define the action location in the form?
Code included below:
RenameDocID method:
<form action="RenameDoc"> <---------????????
<h3>Rename from: [<dtml-var "REQUEST['FileName']">] to :</h3>
<input type=text name=NewName width=20 value=NewName>
<input type=hidden name=OldName width=20 value='<dtml-var
"REQUEST['FileName']">'>
<p>
<input type=submit name=Rename value=Rename>
<input type=submit name=Cancel value=Cancel>
</form>
RenameDoc
<dtml-if "_.hasattr( REQUEST, 'Rename' )">
<dtml-call "manage_renameObject( REQUEST['OldName'], REQUEST['NewName'] )">
<dtml-call "RESPONSE.redirect( 'index_html' )">
<dtml-else>
<dtml-call "RESPONSE.redirect( 'index_html' )">
</dtml-if>