I just use Adobe Labs Spry Framework... this effectively puts the paging in javascript.<br><br><div><span class="gmail_quote">On 5/31/07, <b class="gmail_sendername">Programmer</b> <<a href="mailto:programmer@paradigm-corp.com">
programmer@paradigm-corp.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Hi Jonathan,<br><br>I have something similar to your idea already. The python script
<br>supplies page number to a stored procedure which handles the actual<br>paging. The script takes the result from the proc and builds an html<br>table and handles column sorting on the table. The output of the script<br>
is just a single variable so I can just use &dtml-var instead of the<br>flaky &dtml-in.<br>Problem I have now is this new search interface makes use of full-text<br>searching on SQL Server 2K. The paging proc wasn't written to handle it
<br>and will need to be rewritten from scratch. This will take a lot of time<br>and testing. I thought I could slap something simple and fast together<br>to use in the interim to allow people to start testing the search<br>
engine.<br><br>I really do wish Zope would either fix or eliminate broken features. At<br>the very least have the curtesy to say "hey y'all, this is broke, don't<br>bother" so folks don't waste time with it.
<br><br>Mike<br><br>-----Original Message-----<br>From: Jonathan [mailto:<a href="mailto:dev101@magma.ca">dev101@magma.ca</a>]<br>Sent: Wednesday, May 30, 2007 5:22 PM<br>To: Programmer; <a href="mailto:zope@zope.org">zope@zope.org
</a><br>Subject: Re: [Zope] a batch of inSaNitY!<br><br><br>----- Original Message -----<br>From: "Programmer" <<a href="mailto:programmer@paradigm-corp.com">programmer@paradigm-corp.com</a>><br>To: <<a href="mailto:zope@zope.org">
zope@zope.org</a>><br>Sent: Wednesday, May 30, 2007 4:44 PM<br>Subject: [Zope] a batch of inSaNitY!<br><br><br>> Hi<br>><br>> I am about to go stark, raving, frothing mad with the DTML-IN<br>batching.<br>> Is there a known (or unknown) bug with this?
<br>><br>> I have searched and read everything I can find about this and no luck.<br>> The problem is with carrying the query terms over from one batch page<br>to<br>> the next. Right now I am using the script found here:
<br>><br><a href="http://mail.zope.org/pipermail/zope-collector-monitor/2003-May/002001.ht">http://mail.zope.org/pipermail/zope-collector-monitor/2003-May/002001.ht</a><br>> ml<br>><br>> Except I changed,<br>>
<br>> <dtml-let<br>> batch="_.range(100, 180)"<br>> batch_size="10"<br>> batch_start="REQUEST.get('batch_start',1)"><br>><br>> To<br>><br>> <dtml-let
<br>> batch="myZSQLMethod1"<br>> batch_size="10"<br>> batch_start="REQUEST.get('batch_start',1)"><br>><br>> The mySQLMethod1 takes two params which the search form supplies to
<br>> REQUEST. This works great. The pagination works beautifully. However,<br>> when I use the very same result script with myZSQLMethod2 (same DB<br>> table), which takes 5 params (all optional) the pagination breaks and
<br>> no-longer passes the query terms.<br>> I have checked and rechecked both scripts and both forms. The<br>> ZSQLMethods both test good. I am out of ideas. For the life of me I<br>> cannot figure out why I'm losing my query terms in one and not the
<br>other<br>> when the two are almost identical.<br>> Care to enlighten me with your collective wisdom?<br><br>In similar situations I have done the following:<br><br>1) call a python script/external method which: (i) does the db search;
<br>(ii)<br>formats the results as required for display; (iii) returns a tuple that<br>contains: list of search results, url parameters for 'previous' link;<br>url<br>parameters for 'next' link; url parameters for 'first link'; url
<br>parameters<br>for 'last' link<br><br>2) use a dtml method to call the script/ext.method like<br><br><dtml-let rStat="mySearchRoutine(parm1, parm1, ...)"><br><br> <dtml-in "rStat[0]">
<br> display code here eg. <dtml-var sequence-item><br><br> or could be an html/css table, etc.<br><br> <dtml-if sequence-end><br> <a href="...?<dtml-var "rStat[1]">">previous</a>
<br> <a href="...?<dtml-var "rStat[2]">">next</a><br> <a href="...?<dtml-var "rStat[3]">">first</a><br> <a href="...?<dtml-var "rStat[4]">">last</a>
<br> </dtml-if><br><br> </dtml-in><br></dtml-let><br><br>This greatly simplifies the dtml and facilitates debugging and future<br>modifications.<br><br>hth<br><br>Jonathan<br><br>_______________________________________________
<br>Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a><br>** No cross posts or HTML encoding! **<br>
(Related lists -<br> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev
</a> )<br></blockquote></div><br><br clear="all"><br>-- <br>Thanks,<br>Derek Wilson