<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Re: [Zope] setting Zclass instance id based on propert</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<STYLE type=text/css>BLOCKQUOTE {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
DL {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
UL {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
OL {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
LI {
        PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
</STYLE>

<META content="MSHTML 5.00.3314.2100" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>manage_rename can be found in OFS/CopySupport.py</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Jonathan</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>PS please&nbsp;make sure your posts are&nbsp;sent to the 
group</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A href="mailto:Charlie@J-Town.co.il" title=Charlie@J-Town.co.il>Charlie 
  Kalech</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A href="mailto:toolkit@magma.ca" 
  title=toolkit@magma.ca>Small Business Services</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> December 3, 2003 8:17 AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Zope] setting Zclass 
  instance id based on properties</DIV>
  <DIV><BR></DIV>
  <DIV>Thanks Jonahan -</DIV>
  <DIV><BR></DIV>
  <DIV>I'll give it a shot - any idea where in the source I would look?</DIV>
  <DIV><BR></DIV>
  <DIV>Charlie</DIV>
  <DIV><BR></DIV>
  <DIV><BR></DIV>
  <DIV><BR></DIV>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>Charlie wrote:</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><BR><FONT size=-1>I'm trying to create a 
    context-based id based on the properties.<BR><BR>There must be a way to 
    customize the python constructor such that instead of two steps there is a 
    third step that reassigns the value of the id based on properties *after* 
    they are assigned.<BR><BR>I'm a designer, not a programmer - can somebody 
    help me out here?<BR><BR>I'm looking for someone to fill in the third 
    blank:<BR><BR>(1) Add a new instance of the ZClass<BR>request = 
    context.REQUEST<BR>instance = 
    container.MyZClass.createInObjectManager(request['id'], request)<BR><BR>(2) 
    update a property sheet from the form 
    values<BR>instance.propertysheets.MyZClassProperties.manage_editProperties(requ<SPAN></SPAN>est)<BR><BR>(3) 
    set id to be equal several properties (such as 
    section-chapter-book)<BR></FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>There is a manage_rename 
    routine.&nbsp; I have never used it myself (other than indirectly by 
    clicking on the 'Rename' button on the ZMI display) so I don't know the 
    parameters required.&nbsp; I would guess it would be something 
  like:</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>&lt;dtml-call 
    "manage_rename(old_id, new_id)"&gt;</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>or</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>&lt;dtml-call 
    "old_id.manage_rename(new_id)"&gt;</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>or</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>&lt;dtml-call 
    "old_id.manage_rename(id=new_id)</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>If these don't work, try looking 
    at the source or maybe someone else on the mailing list has some experience 
    with it.</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>HTH</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>Jonathan</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite"><FONT size=-1>Jonathan</FONT></BLOCKQUOTE>
  <BLOCKQUOTE cite type="cite">&nbsp;</BLOCKQUOTE>
  <DIV><BR></DIV>
  <DIV><BR></DIV><X-SIGSEP><PRE>-- 
</PRE></X-SIGSEP>
  <DIV><FONT color=#000000 size=-2><BR></FONT><FONT color=#000000>Charlie 
  Kalech<BR>Director, J-Town Productions Ltd.</FONT></DIV>
  <DIV><FONT color=#000000>_________________________________</FONT></DIV>
  <DIV><FONT color=#000000 size=-2><BR></FONT><FONT color=#000000>Designing Web 
  Sites Since 1994</FONT></DIV>
  <DIV><FONT color=#000000>_________________________________</FONT></DIV>
  <DIV><FONT color=#000000 size=-2><BR></FONT></DIV>
  <DIV><FONT color=#000000 size=-1>E-Mail:<X-TAB> 
  </X-TAB>mailto:Charlie@J-Town.co.il<BR>URL:<X-TAB> 
  </X-TAB>http://www.j-town.co.il<BR><BR>POB 10243 Jerusalem 91102 
  ISRAEL<BR>Tel:<X-TAB>&nbsp;&nbsp;&nbsp;&nbsp; </X-TAB>972-2-671 
  9918<X-TAB>&nbsp; </X-TAB></FONT></DIV>
  <DIV><FONT color=#000000 size=-1>Fax:<X-TAB>&nbsp;&nbsp;&nbsp; 
  </X-TAB>972-2-672 1245</FONT></DIV></BLOCKQUOTE></BODY></HTML>