Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion auto-paginator
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gabriel Balint  
View profile  
 More options Nov 14 2012, 9:39 am
From: "Gabriel Balint" <gabriel.bal...@gmail.com>
Date: Wed, 14 Nov 2012 09:39:30 -0500
Local: Wed, Nov 14 2012 9:39 am
Subject: RE: [atk4] auto-paginator

Thanks, but can you provide a user/password, your example requires login.

Thank you,

  Gabriel

From: agile-toolkit-devel@googlegroups.com
[mailto:agile-toolkit-devel@googlegroups.com] On Behalf Of Janis Volbergs
Sent: Wednesday, November 14, 2012 9:16 AM
To: agile-toolkit-devel@googlegroups.com
Subject: [atk4] auto-paginator

Just out of curiosity, developed a simple auto-paginator which would work
with any Grid (and also lister).

Code:

        $g=$this->add("Grid");
        $g->setModel($m, array("id", "name"));
        $g->add("misc/Controller_AutoPaginator")
            ->setLimit(10);

Example here: http://new.ambienttech.lv/record.html

When you scroll page to bottom, it would reload the grid adding 10 more
rows.

I must note that it's very trivial and is not adding actual 10 lines, but
rather re-reloading the grid with increased limit. In future, when ui.grid
is revamped, we will have room to make it more efficient.

Also, it was nice to find that 12 lines of code was enough to make this
controller work :) Actually, could be even a few lines less.

This controller is part of misc add-on namespace and available in master
branch.

Regards,

Janis

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.