[Zope] More newbie questions: can't find object by ID?

Thomas Weiner weiner@tu-harburg.de
Tue, 14 Sep 1999 18:50:02 +0200


Scott Anderson schrieb:
> 
> Hi all (again),
> 
> Here's my code:
> 
>  DTML Document at /Reporting/Admin/report_management.html
> <!--#var standard_html_header-->
> <!--#if tblReportType-->
>  <table>
>  <tr><th>ID</th><th>Report Description</th></tr>
>  <!--#in tblReportType sort=description-->
>  <tr>
>  <td><!--#var reportTypeID--></td>
>  <td><!--#var description--></td>
>  </tr>
>  <!--#/in-->
>  </table>
> <!--#else-->
> <BR><BR>
> There are no defined reports at this time.
> <BR><BR>
> <!--#/if-->
> <!--#var standard_html_footer-->
> 
> tblReportType is a SQL Method: Z SQL Method at
> /Reporting/Admin/admin_sql/tblReportType
> 

tblReportType is in a subfolder of the folder containing the calling
DTML Document. So the sql-method can't be found when it is called.

Use the <!--#with--> tag in your DTML Document to add the subfolder to
the namespace:

<!--#with admin_sql-->
  <table>
  <tr><th>ID</th><th>Report Description</th></tr>
  <!--#in tblReportType sort=description-->
  <tr>
  <td><!--#var reportTypeID--></td>
  <td><!--#var description--></td>
  </tr>
  <!--#/in-->
  </table>
<!--#/with admin_sql-->
<!--#var standard_html_footer-->

regards,
thomas


-- 
fon: ++49 (0)40 42878 3781
fax: ++49 (0)40 42878 2728