I've been playing around with Zope, and this thing is incredible! I'm really interested in the OOP design, because now I can teach clients how to manage their own web sites. Right now, I'm creating a zopified version of a Links page. A Link ZClass has two properties, an id and a WebAddress (Zope didn't like it when I called this property URL, is there a list of reserved words somewhere?) Unfortunately, the property sheet only shows the WebAddress property. Is there any way I can make it show the id property? I created my own property sheet, but it doesn't have the tabs on the top like the regular zope ones. Is there some boilerplate code somewhere that I can add to the top of my property sheet to do that? When I created my property sheet (called editForm, boilerplate HTML form inside of a table that was patterned after the Link_addForm method), I set the ACTION of the form to edit, this DTML method of Link: <dtml-call "propertysheets.propsheet.manage_changeProperties(REQUEST)"> <dtml-call "manage_renameObject(_.None,REQUEST['oldid'],REQUEST['id'])"> <dtml-call "RESPONSE.redirect(PARENTS[1].absolute_url()+'/manage_main')"> What's the correct incantation to rename a ZClass instance from within the instance? I get an error message "Object with id (id of Link) already exists" Thanks for any and all assistance...Zope is zoporific! -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
When I created my property sheet (called editForm, boilerplate HTML form inside of a table that was patterned after the Link_addForm method), I set the ACTION of the form to edit, this DTML method of Link:
<dtml-call "propertysheets.propsheet.manage_changeProperties(REQUEST)"> <dtml-call "manage_renameObject(_.None,REQUEST['oldid'],REQUEST['id'])"> <dtml-call "RESPONSE.redirect(PARENTS[1].absolute_url()+'/manage_main')">
What's the correct incantation to rename a ZClass instance from within the instance? I get an error message "Object with id (id of Link) already exists"
Ok..Murphy's Law of Mailing Lists applies here: No matter how hard you try to solve your problem, you find the solution five minutes after you ask the list: The magic version of edit: <dtml-call "propertysheets.propsheet.manage_changeProperties(REQUEST)"> <dtml-if "REQUEST['oldid'] != REQUEST['id']"> <dtml-call "manage_renameObject(REQUEST['oldid'],REQUEST['id'],REQUEST)"> </dtml-if> <dtml-call "RESPONSE.redirect(PARENTS[1].absolute_url()+'/manage_main')"> All of my other questions still apply -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
I give up; I apologize for asking such obvious questions.
Unfortunately, the property sheet only shows the WebAddress property. Is there any way I can make it show the id property? Yes, create a Property Sheet Interface for the property and modify it from there.
I created my own property sheet, but it doesn't have the tabs on the top like the regular zope ones. Is there some boilerplate code somewhere that I can add to the top of my property sheet to do that?
<dtml-var manage> -- Stephen Pitts smpitts@midsouth.rr.com webmaster - http://www.mschess.org
participants (1)
-
Stephen Pitts