Multiple Paginate in one Page

238 views
Skip to first unread message

Andres Amaya

unread,
Feb 23, 2012, 2:19:38 PM2/23/12
to play-fr...@googlegroups.com
I am using the head of the paginate module but i need two paginations on the same page for two different tables of two different models.

The page is something like www.mydomain.com/user?id=1 this will show a view of the user wich contains the two tables paginated.
I use the setParameterName() of the paginator to have two different variables for the actual page for each table, and this works ok.

When i click on page 2 for the tableA i get an URL like this:

And then if i click on page 3 for the tableB i get this URL:

And again if the user now click the page 4 of tableA i get this:
And then if i click on page 3 for the tableB i get this URL:

Note: the order of the parameters seems to be random.

How can i know wich one was the last pagination controls they click so i can position the user on that table? ( the page is long so i dont the user to be scrolling each time they click on a paginate control )

Thanks in advance ... aad
--
andres amaya diaz

Andres Amaya

unread,
Feb 23, 2012, 2:23:18 PM2/23/12
to play-framework
Sorry, i am using version 1.2.4

... aad

On Feb 23, 1:19 pm, Andres Amaya <andres.amaya.d...@gmail.com> wrote:
> I am using the head of the paginate module but i need two paginations on
> the same page for two different tables of two different models.
>
> The page is something likewww.mydomain.com/user?id=1this will show a view

Lawrence McAlpin

unread,
Feb 23, 2012, 4:32:45 PM2/23/12
to play-framework
That's not something my control keeps track of. You might try tracking
the current pages in the session and, in your action, compare the
current vs previous values to see which one has changed.

Or maybe an Ajax control might be better for your needs so there
wouldn't be a page refresh when they switch pages.

R. Rajesh Jeba Anbiah

unread,
Feb 24, 2012, 12:37:41 AM2/24/12
to play-framework
On Feb 24, 12:19 am, Andres Amaya <andres.amaya.d...@gmail.com> wrote:
> I am using the head of the paginate module but i need two paginations on
> the same page for two different tables of two different models.

It would be typical MVC question. In play!, I don't find any
straight forward solution unless you use Japid that has wonderful
"invoke" call. So, with that approach, it will be like lot of iframes/
SSI and Ajax preferably with jQuery Tabs plugin

Andres Amaya

unread,
Feb 24, 2012, 1:37:49 PM2/24/12
to play-framework
Thanks for your comments.

I think i'll do it the AJAX way seems the best approach for this.

... aad

On Feb 23, 11:37 pm, "R. Rajesh Jeba Anbiah"
<ng4rrjanb...@rediffmail.com> wrote:
> On Feb 24, 12:19 am, Andres Amaya <andres.amaya.d...@gmail.com> wrote:
>
> > I am using the head of thepaginatemodule but i need two paginations on
Reply all
Reply to author
Forward
0 new messages