Problem with PageNavigationBar

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

Problem with PageNavigationBar

Postby Jens » Mon Sep 06, 2010 7:14 am

Hello,

I'm facing serious problems while working with the PageNavigationBar. In my application I have to instantiate the PageNavigationBar at a time when the data of the table isn't available. The data for the table is loaded from the database in a separate thread.
Is there a chance of setting the table after instantiating the PageNavigationBar?
Jens
 
Posts: 2
Joined: Mon Sep 06, 2010 5:24 am

Re: Problem with PageNavigationBar

Postby JIDE Support » Mon Sep 06, 2010 7:20 am

Yes. You could have a JTable first then instantiate the PageNavigationBar. Once you get data from your server, please try to use yourOriginalTableModel#fireTableDataChanged() instead of invoking JTable#setModel(). In this way, your PageNavigationBar should be able to work.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33875
Joined: Sun Sep 14, 2003 10:49 am

Re: Problem with PageNavigationBar

Postby Jens » Mon Sep 06, 2010 11:25 pm

Thanks for the fast reply.
Using fireTableDataChanged() works fine.
But now I have another problem. I want my table to show only 10 records per page. When I recieve the data from the server the size of the collection is >10. After using fireTableDataChanged() the whole data will be shown in the table and not only the first 10 records.
Jens
 
Posts: 2
Joined: Mon Sep 06, 2010 5:24 am

Re: Problem with PageNavigationBar

Postby JIDE Support » Tue Sep 07, 2010 1:18 pm

Please try to invoke PageNavigationSupport#setPageSize() to customize the page size.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 33875
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests

cron