tag:blogger.com,1999:blog-88740943618447744942024-02-20T11:33:51.139+01:00Oliver Wahlen's BlogBlog on Java based Web Frameworks and Technologies.Anonymoushttp://www.blogger.com/profile/00609318660663162007noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8874094361844774494.post-73504978286362614402008-08-11T18:22:00.019+02:002008-08-11T20:08:04.425+02:00Netbeans Visual Web Tables with thousands of recordsMaybe you have noticed that the table component in Netbeans visual<br />web tends to become quite slow if it has to deal with a huge amount of<br />records (e.g. coming from a database).<br />This is true even if pagination is used.<br /><br />The reason is that the typical dataproviders (e.g. ObjectArrayDataProvider) on the server side require a complete fetch of all data from the database.<br />Based on this data they analyze the amount of records which in turn is used to operate the augmented table header and the pagination controls.<br />Thus the application does not only become slow (because of the sql operations) but also consumes a large amount of memory.<br /><br />To overcome this problem I have created a new dataprovider called ObjectControllerDataprovider.<br />Like all the other dataprovider this class can directly be used in the table layout of the visual table component.<br />This ObjectControllerDataprovider is in turn connected an ObjectController.<br />In more detail the ObjectControllerDataprovider is connected to a class that is to be written manually which extends the abstract ObjectController class.<br />The manual written class finally contains the functionality to efficiently retrieve small pages from a database utilizing a caching window concept.<br /><br />You can download a working Netbeans 6.1 example project using the new dataprovider from the following link: <a href="http://sites.google.com/site/owahlen/Home/ObjectControllerTest.tar.gz">http://sites.google.com/site/owahlen/Home/ObjectControllerTest.tar.gz</a>Anonymoushttp://www.blogger.com/profile/00609318660663162007noreply@blogger.com1