File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes pagination jquery dinamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "pagination jquery dinamically" Watch "pagination jquery dinamically" New topic

pagination jquery dinamically

Dura Hurtado
Ranch Hand

Joined: Feb 16, 2011
Posts: 120
Hi I am trying to paginate a .xhtml using jquery pagination plugin, but in this case me would like retrieve a value from the DDBB->BackBean an int value, and
in function of this value it shows the equivalent number of buttons to that number.

I mean if it retrieves 4 the show four pages.

The way I am using I suppose it´s not the better way then I am going to explain it here.

I have several fields (VARCHAR) in a DDBB then I retrieve the values which are not null, and I have a pagination plugin query which show as buttons as

<div class="result"> there are in the .xhtml.

The bizarre trick which I am using is as follows: if it retrieve 1 this way , then it calls the file 1.xhtml which shows the elements from the field 1 in the DDBB, and it shows just one button from the pagination plugin.

If it retrieves field 2 in the DDBB then it shows the elements from the DDBB field two and so on.

Obviusly it creates a huge file when it retrieves a 100 value from DDBB, also the performance is not very good.

¿Anyone knows a better way to do that?

I would appretiate it a lot.


I agree. Here's the link:
subject: pagination jquery dinamically
It's not a secret anymore!