Hi there,

I've just been playing a bit with zc.table. This is very exciting code that could make a lot of custom code go away. Way cool! (and zc.resourcelibrary is also nice!). If I knew the individual developers I could give them my personal thanks. :)

I ran into some issues and I figured I would give some feedback:

The first issue is I think just something that tripped me up and might be fixed if we put big warning signs in the documentation. Right now it says about GetterColumn:

"It includes a reasonable simple implementation of ISortableColumn but does not declare the interface itself. It tries to sort on the basis of the getter value and can be customized simply by overriding the `getSortKey` method."

but it's easy to read over this, and I only found out that GetterColumn uses implementsOnly and thus I need to actually do a directlyProvides to make it an ISortableColumn after some grasping about. I think I understand the motivation - we do not want to make everything sortable by default even when we're used GetterColumn, but perhaps this could be spelled out a bit more explicitly.

A second issue seems to me a bug in the javascript. When I use StandaloneSortFormatter I can click on the title of a column to sort to see a sorted view. This works wonderfully well. Unfortunately the javascript is a bit simplistic in that it simply adds the sort_on:list parameter over and over to the URL. This makes for very long and ugly URLs. Want me to work on a bugfix?

The third issue is more like a missing feature. I was playing with the batching support, and I got it to work. Still, I had to write a bit of batching code myself and to make it fully work, I'd have to make sure of not showing 'previous' at the beginning of the fist batch, not showing 'next' at the beginning of the last batch, and the like.

In addition, when combining batching with sorting support it is rather confusing - when you reverse sort everything, the batching links will need to work differently too. Batching link support would be nice there.

I may find myself working on that too; if people have thoughs about it let me know.

Then finally a bit about zc.resourcelibrary that would've tripped me up if I hadn't looked its source yesterday. zc.resourcelibrary adds resources to the <head> section of the web page by hooking in and adding it before the </head> tag in the output. This doesn't work if you have a test page that doesn't contain a <head> section at all. :)


Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to