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> &lt;<a href="mailto:programmer@paradigm-corp.com">
programmer@paradigm-corp.com</a>&gt; 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 &amp;dtml-var instead of the<br>flaky &amp;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&#39;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 &quot;hey y&#39;all, this is broke, don&#39;t<br>bother&quot; so folks don&#39;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: &quot;Programmer&quot; &lt;<a href="mailto:programmer@paradigm-corp.com">programmer@paradigm-corp.com</a>&gt;<br>To: &lt;<a href="mailto:zope@zope.org">
zope@zope.org</a>&gt;<br>Sent: Wednesday, May 30, 2007 4:44 PM<br>Subject: [Zope] a batch of inSaNitY!<br><br><br>&gt; Hi<br>&gt;<br>&gt; I am about to go stark, raving, frothing mad with the DTML-IN<br>batching.<br>&gt; Is there a known (or unknown) bug with this?
<br>&gt;<br>&gt; I have searched and read everything I can find about this and no luck.<br>&gt; The problem is with carrying the query terms over from one batch page<br>to<br>&gt; the next. Right now I am using the script found here:
<br>&gt;<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>&gt; ml<br>&gt;<br>&gt; Except I changed,<br>&gt;
<br>&gt; &lt;dtml-let<br>&gt;&nbsp;&nbsp;batch=&quot;_.range(100, 180)&quot;<br>&gt;&nbsp;&nbsp;batch_size=&quot;10&quot;<br>&gt;&nbsp;&nbsp;batch_start=&quot;REQUEST.get(&#39;batch_start&#39;,1)&quot;&gt;<br>&gt;<br>&gt; To<br>&gt;<br>&gt; &lt;dtml-let
<br>&gt;&nbsp;&nbsp;batch=&quot;myZSQLMethod1&quot;<br>&gt;&nbsp;&nbsp;batch_size=&quot;10&quot;<br>&gt;&nbsp;&nbsp;batch_start=&quot;REQUEST.get(&#39;batch_start&#39;,1)&quot;&gt;<br>&gt;<br>&gt; The mySQLMethod1 takes two params which the search form supplies to
<br>&gt; REQUEST. This works great. The pagination works beautifully. However,<br>&gt; when I use the very same result script with myZSQLMethod2 (same DB<br>&gt; table), which takes 5 params (all optional) the pagination breaks and
<br>&gt; no-longer passes the query terms.<br>&gt; I have checked and rechecked both scripts and both forms. The<br>&gt; ZSQLMethods both test good. I am out of ideas. For the life of me I<br>&gt; cannot figure out why I&#39;m losing my query terms in one and not the
<br>other<br>&gt; when the two are almost identical.<br>&gt; 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 &#39;previous&#39; link;<br>url<br>parameters for &#39;next&#39; link; url parameters for &#39;first link&#39;; url
<br>parameters<br>for &#39;last&#39; link<br><br>2) use a dtml method to call the script/ext.method like<br><br>&lt;dtml-let rStat=&quot;mySearchRoutine(parm1, parm1, ...)&quot;&gt;<br><br>&nbsp;&nbsp;&lt;dtml-in &quot;rStat[0]&quot;&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display code here eg.&nbsp;&nbsp;&lt;dtml-var sequence-item&gt;&lt;br&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or could be an html/css table, etc.<br><br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;dtml-if sequence-end&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href=&quot;...?&lt;dtml-var &quot;rStat[1]&quot;&gt;&quot;&gt;previous&lt;/a&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href=&quot;...?&lt;dtml-var &quot;rStat[2]&quot;&gt;&quot;&gt;next&lt;/a&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href=&quot;...?&lt;dtml-var &quot;rStat[3]&quot;&gt;&quot;&gt;first&lt;/a&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;a href=&quot;...?&lt;dtml-var &quot;rStat[4]&quot;&gt;&quot;&gt;last&lt;/a&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/dtml-if&gt;<br><br>&nbsp;&nbsp;&lt;/dtml-in&gt;<br>&lt;/dtml-let&gt;<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&nbsp;&nbsp;-&nbsp;&nbsp;<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>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp;&nbsp;**<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