[Zope3-Users] beginning orientation

Tom Dossis td at yoma.com.au
Mon Dec 20 19:58:01 EST 2004


Martin Blais wrote:
> 
> additionally there are items that i still do not understand clearly:
> 
> - if there is a separation between handling code and rendering code,
> how does handling code pass information specific to that handling to
> the rendering code that gets returned after handling a request?

Browser "rendering" is commonly done via ZPT, though this isn't a 
requirement.  For example, you could return html via your action 
handling object.

Often the response to a request will be a response page template, which 
  presumably will have access to the context, request, etc. and the view 
class specified in the browser:page ZCML for that template.  Your 
handling code could pass info via any of these object.

e.g. hard code response params..
request.response.redirect("status.html?status=OK&message="Saved!")



> - how can i implement an input form (a view, i guess) without tying it
> to a data type in the database?  say, just some input form, calling a
> method and then i do whatever with the input data (maybe even dropping
> some of it)

Using ZCML you could add a menu item to the zmi_actions menu, with 
"for=*" and a corresponding browser page for your form.  This won't be 
tied to any "types" (but, will still have a rendering context).
(Look in zope/app/configure.zcml to see how the undo menu is setup).

Keep in mind the menu/actions configuration for X3 is currently very 
basic compared to something like Plone.






More information about the Zope3-users mailing list