[z3-five] zc.table sorting
Dennis Schulz
d.schulz81 at gmx.net
Tue Nov 14 20:55:37 CET 2006
Sorry, but the adding of <include package="zc.table" /> in my
configure.zcml didn't change anything.
Here the way I call the Formater:
self.table = table.FormSortFormatter(self.context,
self.request,
results,
columns=columns,
batch_start=0,
batch_size=2,
sort_on=(('name',
True),))
The problem is that the adapter can't be found in the rendering method ....
Module zc.table.table, line 354, in _addSortUi
Module zope.component, line 141, in getAdapter
Can anyone tell me how to interpret this line exactly
ComponentLookupError: (<HTTPRequest,
URL=http://localhost:8080/dennis/applications/purchaserequisition.2006-11-07.5098603683/tableview.html>,
<InterfaceClass zope.interface.Interface>, 'zc.table')
the view behind tableview.html can't lookup the component with the name
"zc.table" and zope.interface.Interface cant be adapted?
how can I solve this?
Dennis
> Dennis Schulz wrote:
> > Hi,
> > I have tried to sort my columns by the following code that I found
> in various examples around:
> >
> > columns = [
> > GetterColumn(name=u'name', title=u'Full Name', getter=lambda i,
> f: '<a href="tableview.html?display=view&id=%s">%s</a>' %
> (quote(i.name), i.name), subsort=True),
> > GetterColumn(name=u'description', title=u'Full Description',
> getter=lambda i, f: i.description, subsort=True),
> > GetterColumn(name=u'purchasingclass', title=u'Purchasing Class',
> getter=lambda i, f: i.purchasingClass.name, subsort=True)
> > ]
> >
> > for c in columns:
> > directlyProvides(c, zc.table.interfaces.ISortableColumn)
> >
> >
> > I get the following error and traceback:
> > ( I use Zope 2.9.5, Plone 2.5.1, Five 1.4.1, zc.table 0.6 py 2.4.egg,
> > are there any proves that zc.table sorting works with this zope
> version??)
>
> No idea. But from the looks of it it seems that you didn't include
> zc.table's configuration. You need <include package="zc.table" />
> somewhere in your ZCML tree (site.zcml,
> package-includes/*-configure.zcml, your Product's configure.zcml, etc.).
>
>
>
> --
> http://worldcookery.com
> <http://service.gmx.net/de/cgi/derefer?DEST=http%3A%2F%2Fworldcookery.com>
> -- Professional Zope documentation and training
>
> _______________________________________________
> z3-five mailing list
> z3-five at codespeak.net
> http://codespeak.net/mailman/listinfo/z3-five
> <http://service.gmx.net/de/cgi/derefer?DEST=http%3A%2F%2Fcodespeak.net%2Fmailman%2Flistinfo%2Fz3-five>
More information about the z3-five
mailing list