[Zope-DB] Need an idea on how to sort a table

Laura McCord Laura.McCord at doucet-austin.com
Wed Sep 1 10:27:38 EDT 2004

I don't think that I can use a javascript sorting algorithm because I
have to create a separate table just to include headings. Plus, I have
to deal with a 
<div tal:repeat ...> to cycle through the data. It is so complicated
because each record of data is it's own table because each record is
clickable and it will expand out and open another table with even more
data assocaiated with that record.

Here is a sample of what I am dealing with:
<div tal:repeat="result batch"> 
<div tal:define="SystemNetName result/SystemNetName; 
                  resString python:here.increment()"> 
<div tal:attributes='id string:${resString}Parent' CLASS="parent">
<table width=600 border=0 >
 <td width=50>
 <a href="#" tal:attributes="onClick string:expandIt('${resString}');;
return false;">
  <IMG NAME="imEx" SRC="triDown.gif" WIDTH=15 HEIGHT=15 BORDER=0
ALT="Expand/Collapse Item">
  <td width=100><span tal:replace="result/UserName">UserName goes
  <td width=50><span tal:replace="result/UseType">UseType goes
  <td width=150><span tal:replace="result/SystemNetName">SystemNetName
goes here</span></td>
  <td width=175><span tal:replace="result/Model">manufacturer goes
  <td width=50><span tal:replace="result/Site">Site</span></td>
  <td width=25><span><a tal:attributes="href python:
'pc_form2?SystemNetName=' + str(SystemNetName)">More</a></span></td>

<!-- Here is the separate table of data that is expanded with a click of
a record -->
<DIV tal:attributes='id string:${resString}Child' CLASS="child">
   <table width=500 border=0 bgcolor="#e7e7e7">
       <tr> ......

So, is there a way of sorting the data with a selection list of how to
sort the data? 


More information about the Zope-DB mailing list