<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi, forgive the double posting. My membership to grok-dev hasn't been approved yet...<br><div><br><div><br></div><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div 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 &nbsp;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'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;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'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;def __init__(self, context, request):</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;super(Index, self).__init__(context, request)</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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'">&lt;p> Here is the table from z3c.table &lt;/p></font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp;&lt;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'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;grok.name('nameCol')</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;grok.adapts(table.interfaces.ITable)</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;grok.provides(table.interfaces.IColumn)</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;header = u'Name'</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;attrname = 'who'</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;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></div></blockquote></div><br></body><br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</html>