[ZDP] BackTalk to Document Zope Developer's Guide (2.4 edition)/Zope Products

webmaster@zope.org webmaster@zope.org
Fri, 08 Nov 2002 20:24:05 -0500


A comment to the paragraph below was recently added via http://www.zope.org/Documentation/Books/ZDG/current/Products.stx#3-63

---------------

      DTML class methods are callable directly from the web, just like
      other methods. So now users can see your edit form by calling the
      'editForm' method on instances of your poll class. Typically DTML
      methods will make calls back to your instance to gather
      information to display. Alternatively you may decide to wrap your
      DTML methods with normal methods. This allows you to calculate
      information needed by your DTML before you call it. This
      arrangement also ensures that users always access your DTML
      through your wrapper. Here's an example::

        from Globals import DTMLFile

        class PollProduct(...):
          ...

          _editForm=DTMLFile('dtml/edit', globals())

          def editForm(self, ...):
              ...

              return self._editForm(REQUEST, ...)

        % Anonymous User - Nov. 8, 2002 8:24 pm:
         Please beef up example with parameters to the dtml like
             return self._editForm(REQUEST, a, b, c)