<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there,<div><br></div><div>I'm trying to get a better feel for grok so that I can evaluate for an upcoming project - so far, its been a relatively painless experience!</div><div><br></div><div>However, I've been using Paul Carduner's guide to the z3c packages (<a href="http://carduner.net/docs/z3c-tutorial/)">http://carduner.net/docs/z3c-tutorial/)</a> and thought I would try out using z3c.table, and have hit a stumbling block</div><div><br></div><div>I have a view, thus:</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'">class Index(grok.View):</font></div><div><font class="Apple-style-span" face="'Courier New'"> grok.context(gehar)</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'"> def __init__(self, context, request):</font></div><div><font class="Apple-style-span" face="'Courier New'"> super(Index, self).__init__(context, request)</font></div><div><font class="Apple-style-span" face="'Courier New'"> self.tableView = table.Table(context, request)</font></div><div><br></div><div>(note I can't have Index inherit z3c.table.Table, as Table's render() method causes conflicts with my index.pt)</div><div>and in my corresponding index.pt I can have the following:</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'"><p> Here is the table from z3c.table </p></font></div><div><font class="Apple-style-span" face="'Courier New'"> <div tal:replace="structure python:view.tableView.renderTable()" /></font></div><div><br></div><div><br></div><div>So far, so good -- no table gets displayed though, as I haven't registered columns as named multiadapters. This is where things go pear shaped.</div><div><br></div><div>I have in my code the following -- can someone see what I'm doing wrong?</div><div><br></div><div><div><font class="Apple-style-span" face="'Courier New'">from z3c.table import table, column</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div></div><div><div><font class="Apple-style-span" face="'Courier New'">class NameColumn(column.GetAttrColumn, grok.MultiAdapter):</font></div><div><font class="Apple-style-span" face="'Courier New'"> grok.name('nameCol')</font></div><div><font class="Apple-style-span" face="'Courier New'"> grok.adapts(table.interfaces.ITable)</font></div><div><font class="Apple-style-span" face="'Courier New'"> grok.provides(table.interfaces.IColumn)</font></div><div><font class="Apple-style-span" face="'Courier New'"> header = u'Name'</font></div><div><font class="Apple-style-span" face="'Courier New'"> attrname = 'who'</font></div><div><font class="Apple-style-span" face="'Courier New'"> weight = 1</font></div><div><br></div><div>Once I get an answer, I can write it up as a howto.</div><div><br></div><div>Thanks in advance for any help :)</div><div>Regards,</div><div>Adam</div><div><br></div></div></div></div></body></html>