[Zope] Re: Using Dieter's Dispatcher

Dieter Maurer dieter@handshake.de
Mon, 13 May 2002 21:12:19 +0200


Dennis Allison writes:
 > ...
 > The bindings of forma and formadesc and FSSession are done throuygh the
 > manage interface.
 > 
 > Using the  doform is the dispatcher instance,
 > 
 >         <dtml-var expr="doform.new()">
 > 
 > should create new object (forma instance) and render it.
 > 
 >         <dtml-var expr="doform.edit()"
 > 
 > renders the form with filled-in values from the current session,
 > 
 >         <dtml-var expr="doform.update()"
Note, please, that you are allowed to call this method only,
when you return to the dispatcher after you have made a "dispatch out"
(i.e. "__call__").

 > whereas update renders the form with saved values or new values
 > with new values taking precedence.
 > 
 > 	<dtml_call expr="doform.__call__()">
 > 
 > is used to save variables in the session object and then dispatch
 > to an object with the format (.*)__disp(.[x]])? found somewhere
 > in the form.  (A bit more explantion and and example would help
 > here....)
This is very similar to Zope's ":method".

The "xxx__disp" is either the name of a button (more precisely,
input type=submit) or a hidden variable, then usually in the
form "__disp" with the value specifying the destination.

With the "__disp", you specify the destination page that should
be rendered when the variables are saved.

 > Is my understanding of how to use the product correct?
Mostly (see the "update" remark above).
 > I think I am missing something fundamental as the small example
 > I put together fails with an attribute error in _setup.
Maybe a bug or an incompatibility with your session product?

You know, how you should report errors?

  Error Type, Error Value and traceback are necessary information
  to say anything about a problem.


I will be away for several weeks and thanks to lots of email ads,
my mailbox will probably run out of quota. Thus, be patient
and submit the additional information in about 3 to 4 weeks.


Dieter