[Zope] zclasses - changing properties

kedai kdie@kedai.com.my
Sat, 25 Sep 1999 05:54:04 +0800


hi, got a zclass Q.  referred to prev message by kevin regarding changing properties.  also checked and copied from kevin's KMnetNews (the edit and postit method in kmarticle class).  but to no avail.

here's my situation

got zclass Urls in zclass Links.  zclass Urls got one property - url_info.  url_info consists of url_id (a string) and link_id (also a string).


creating an instance and
adding thru management interface is OK.  adding thru self made form is not . there's no error.  i did get the values right after the add_url_id_cons method.
the url to try : www.kedai.com.my:8080/test/MiscLinks/News/add_url_id

TIA

  here's the code:

-----add_url_id---

<dtml-if "not REQUEST.form.has_key('url_id')">
  <dtml-call "REQUEST.set('url_id', 'Enter URL')">
</dtml-if>
<dtml-if "not REQUEST.form.has_key('link_id')">
  <dtml-call "REQUEST.set('link_id', 'Site Name')">
</dtml-if>

<form action="add_url_id_cons"><table> 
<tr><th>Id</th> 
    <td><input type=text name=id ></td> 
</tr> 

<tr>
  <td align="left" valign="top" width="16">
      </td>
  <td align="left" valign="top">
  <strong><LABEL FOR="cb-url_id">url_id</LABEL></strong>
  </td>
  <td align="left" valign="top">
      <input type="text" name="url_id:string" size="35"
   value="<dtml-var url_id>">
      </td>
</tr>
<tr>
  <td align="left" valign="top" width="16">
      </td>
  <td align="left" valign="top">
  <strong><LABEL FOR="cb-link_id">link_id</LABEL></strong>
  </td>
  <td align="left" valign="top">
      <input type="text" name="link_id:string" size="35"
   value="<dtml-var link_id>"
      </td>
</tr>


<tr><td></td><td><input type=submit value=" Add "></td></tr> 
</table></form> 
--------------------------------

the method is here
-----------------add_url_id_cons---------------
<!--#var standard_html_header-->
 <dtml-with "Urls.createInObjectManager(REQUEST['id'], REQUEST)">

       <!--#call "propertysheets.Urls.manage_changeProperties(REQUEST)"-->
</dtml-with>
<dtml-call reindex_object>

Thanks
<dtml-var link_id> = <dtml-var url_id>
<!--#var standard_html_footer-->
-----------------------------------------------