[Zope] ZSQL and batch processing

Ulrich Wisser u.wisser@luna-park.de
Mon, 15 Nov 1999 23:49:03 +0100


Hello,

I try to make a batched output from an ZSQL result. I got
the previous link working. But whatever I do no next page
link will be shown. Did anybody already make this thing
work? 
I have 23 objects returned and only five will be in one batch. 
That part works fine (easy going, out of the box). When
I give different qs parameter it works. Only the "next page"
link doesn't show up. Any suggestions?

Please find my code below.

Thanks

Ulli


    <dtml-in sqlListDirectories size=5 start=qs>
      <dtml-if sequence-start>
        <TR><TD COLSPAN=2 CLASS="contenttitle">Verzeichnisse 
          <dtml-var sequence-step-start-number> - <dtml-var
sequence-step-end-number> (total: <dtml-var count-name>)
        </TD></TR>
      </dtml-if>
    </dtml-in>

<dtml-comment>
    <!-- This code didn't work at all, although it is a sample from DTML
Reference -->
    <dtml-in sqlListDirectories previous size=5 start=start>
      <TR><TD ALIGN=LEFT ><A HREF="<dtml-var document_id><dtml-var
sequence-query>start=<dtml-var previous-sequence-start-index>">Vorherige
Seite</A></TD></TR>
    </dtml-in>

    <dtml-in sqlListDirectories next size=5 start=start>
      <TR><TD ALIGN=RIGHT><A HREF="<dtml-var document_id><dtml-var
sequence-query>start=<dtml-var next-sequende-start-index>">N&auml;chste
Seite</A></TD></TR>
    </dtml-in>
</dtml-comment>

    <dtml-in sqlListDirectories size=5 start=qs>
      <dtml-if sequence-start>
        <TR>
          <TD ALIGN=LEFT>
            <dtml-if previous-sequence>
              <!-- This code works -->
              <A HREF="<dtml-var document_id><dtml-var
sequence-query>qs=<dtml-var previous-sequence-start-index>">Vorherige
Seite</A>
            <dtml-else>
              &nbsp;
            </dtml-if>
          </TD>
          <TD ALIGN=RIGHT>
            <!-- This code always displays &nbsp; -->
            <dtml-if next-sequence>
              <A HREF="<dtml-var document_id><dtml-var
sequence-query>qs=<dtml-var next-sequence-start-index>">N&auml;chste
Seite</A>
            <dtml-else>
              &nbsp;
            </dtml-if>
          </TD>
        </TR>
      </dtml-if>
      <TR>
        <TD><A HREF="dtEditDirectory?dirid=<dtml-var id>"><dtml-var
name></A></TD>
        <TD><A HREF="<dtml-var url>"><dtml-var url></A></TD>
      </TR>
    </dtml-in>

-- 
----------------- Die Website Effizienzer ------------------
luna-park                Bravo Sanchez, Vollmert, Wisser GbR
Ulrich Wisser                   mailto:u.wisser@luna-park.de
Alter Schlachthof, Immenburgstr. 20      Tel +49-228-9654055
D-53121 Bonn                             Fax +49-228-9654057
------------------http://www.luna-park.de ------------------