aspose file tools*
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "pagination jquery dinamically" Watch "pagination jquery dinamically" New topic
Author

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.

Thanks




 
Consider Paul's rocket mass heater.
 
subject: pagination jquery dinamically