(self, REQUEST=None)
return {'b_start': b_start, 'b_end': b_end,
                'prev_batch_url': prev_url,
                'next_batch_url': next_url,
                'formatted_list': ''.join(formatted)}
Return a structure for a page template to show the list of objects.
Return a structure for a page template to show the list of objects.
Return a structure for a page template to show the list of objects .
def getBatchObjectListing(self, REQUEST=None):
        """Return a structure for a page template to show the list of objects.
        """
        if REQUEST is None:
            REQUEST = {}
        pref_rows = int(REQUEST.get('dtpref_rows', 20))
        b_start = int(REQUEST.get('b_start', 1))
        b_count = int(REQUEST.get('b_count', 1000))
        b_end = b_start + b_count - 1
        url = self.absolute_url() + '/manage_main'
        count = self.objectCount()

        if b_end < count:
            next_url = url + '?b_start=%d' % (b_start + b_count)
        else:
            b_end = count
            next_url = ''

        if b_start > 1:
            prev_url = url + '?b_start=%d' % max(b_start - b_count, 1)
        else:
            prev_url = ''

        formatted = [listtext0 % pref_rows]
        for optID in islice(self.objectIds(), b_start - 1, b_end):
            optID = escape(optID)
            formatted.append(listtext1 % (escape(optID, quote=1), optID))
        formatted.append(listtext2)
        return {'b_start': b_start, 'b_end': b_end,
                'prev_batch_url': prev_url,
                'next_batch_url': next_url,
                'formatted_list': ''.join(formatted)}
def getBatchObjectListing ( self , REQUEST = None ) : if REQUEST is None : REQUEST = { } pref_rows = int ( REQUEST . get ( 'dtpref_rows' , 20 ) ) b_start = int ( REQUEST . get ( 'b_start' , 1 ) ) b_count = int ( REQUEST . get ( 'b_count' , 1000 ) ) b_end = b_start + b_count - 1 url = self . absolute_url ( ) + '/manage_main' count = self . objectCount ( ) if b_end < count : next_url = url + '?b_start=%d' % ( b_start + b_count ) else : b_end = count next_url = '' if b_start > 1 : prev_url = url + '?b_start=%d' % max ( b_start - b_count , 1 ) else : prev_url = '' formatted = [ listtext0 % pref_rows ] for optID in islice ( self . objectIds ( ) , b_start - 1 , b_end ) : optID = escape ( optID ) formatted . append ( listtext1 % ( escape ( optID , quote = 1 ) , optID ) ) formatted . append ( listtext2 ) return { 'b_start' : b_start , 'b_end' : b_end , 'prev_batch_url' : prev_url , 'next_batch_url' : next_url , 'formatted_list' : '' . join ( formatted ) }