[z3-checkins] r9613 - z3/Five/trunk

faassen at codespeak.net faassen at codespeak.net
Thu Mar 3 18:47:12 MET 2005


Author: faassen
Date: Thu Mar  3 18:47:12 2005
New Revision: 9613

Added:
   z3/Five/trunk/TODO.txt
Log:
Add plan to add Adding and Add forms to Five.


Added: z3/Five/trunk/TODO.txt
==============================================================================
--- (empty file)
+++ z3/Five/trunk/TODO.txt	Thu Mar  3 18:47:12 2005
@@ -0,0 +1,45 @@
+
+Make adding/add views work in Five
+==================================
+
+The participants:
+
+* zope.app.container.browser.adding (defines the + view, ContentAdding)
+
+* zope.app.form.browser.add (particular add forms, AddView)
+
+The plan (after much digging through the code):
+
+* We need to port both the ContentAdding class as well as AddView to
+  Five, both need to subclass BrowserView.
+
+* In addition, ContentAdding also needs to subclass FiveTraversable.
+
+* Probably FiveTraversable needs to be modified so it gets the request using
+  aq_explicit, as Five's BrowserView supports explicit acquisition only.
+
+This way, the following sequence should be supported:
+
+* path is foo/+/addsomething
+
+* Zope 2 traverses to object foo
+
+* Then Five's __bobo_traverse__ looks for an ITraverser to go to '+'.
+
+* The FiveTraversable adapter will find the (Five BrowserView +
+  FiveTraversable) ContentAdding.
+
+* Zope 2 tries to traverse to 'addsomething'
+
+* Again in Five's __bobo_traverse__, an ITraverser is found to go to
+  'addsomething'
+
+* The FiveTraversable adapter will now find the (Five BrowserView)
+  AddView. The FiveTraversable adapter can find the REQUEST, as is
+  (explicitly) acquired from the Five ContentAdding view.
+
+* This is published to the world.
+
+An alternative route would be to pass multiple steps (['+',
+'addsomething']) directly to the ITraverser. Care should be taken to
+make Zope 2's acquisition do the right thing for the '+' step though.


More information about the z3-checkins mailing list