Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 45821 invoked from network); 30 Mar 2004 01:29:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Mar 2004 01:29:54 -0000 Received: (qmail 5518 invoked by uid 500); 30 Mar 2004 01:29:29 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 5499 invoked by uid 500); 30 Mar 2004 01:29:29 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 5484 invoked from network); 30 Mar 2004 01:29:28 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by daedalus.apache.org with SMTP; 30 Mar 2004 01:29:28 -0000 Received: (qmail 9678 invoked by uid 65534); 30 Mar 2004 01:29:36 -0000 Received: from a183069.studnetz.uni-leipzig.de (EHLO gmx.de) (139.18.183.69) by mail.gmx.net (mp026) with SMTP; 30 Mar 2004 03:29:36 +0200 X-Authenticated: #3483660 Message-ID: <4068CD80.807@gmx.de> Date: Tue, 30 Mar 2004 03:29:36 +0200 From: Joerg Heinicke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: de-de, de, en-us, en-gb, en MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: Woody repeater and big record count References: <4046E054.2020301@acm.org> In-Reply-To: <4046E054.2020301@acm.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On 04.03.2004 08:52, Vasyl Stashuk wrote: > Hi! > > I have large number of records, that should be shown to user. They can't > fit on one page. > What is best way to implement paging using woody? I do it the following way: I have an object repeatersettings with properties row count, offset and total hits. They are bound to the form model. Additionally I have 4 buttons start, end, next, previous for changing the offset, and a field + button for changing the row count. Offset and row count handling is in the flow. The repeatersettings are passed to the data access layer and at the end OJB returns a collection with exactly {row count} elements and re-sets the total hits. The offset is taken into account easily by using setStartAtIndex() and setEndAtIndex() on the Query. The total hits are read from the OJBIterator (returned from getIteratorByQuery) using fullSize(). I guess it simply depends on the number of objects, but creating an instance for all entries in the database for giving Woody the complete control over the repeater might be not handy. Joerg --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org