[z3-five] traversing path expression

Tim Terlegård tim at se.linux.org
Fri Feb 16 12:34:33 CET 2007


Hi,

I'm trying to use Five and plone.app.form to get an automatic edit form
which uses zope.formlib. There seems to be a problem with traversal of the
path expressions in the template. I get back None for the 'view/xxx'
expression for any value of xxx.

The OrderedMultiSelectWidget (orderedSelectionList.pt) is used for showing
my List field. After debugging the widget, tal etc I finally came to the
part where traversing apapters are used for finding 'xxx' of the view. The
widget (which is the view) is adapted to ITraversable in
zope.app.traversing.adapers.py. It finds Five.traversable.FiveTraversable
which doesn't look for the 'xxx' attribute, it just looks for an adapter
with the name 'xxx'. It can't find one and the traversing returns None
and so does the path expression.

FiveTraversable inherits from DefaultTraversable which seems to look at
the attribute, but FiveTraversable overrides the traverse method with
code that doesn't consider the attributes, it only search for an adapter.

I'm very confused. Am I missing some five zcml directives or why can't
my path expression be traversed correctly? I'm using Five 1.4,2.

Tim


More information about the z3-five mailing list