Friday, November 17, 2006

Paging and Sorting in ejb3 Analysis

Netbeans 5.5 VisualWeb Pack is a lovey tool for rapid application development. It is the best solution for your visual development. It lacks few features which are available in its cousin Sun Studio Creator(SJSC). For example in SJSC one can drag an EJB component on to a table. The table automatically re-draws itself to show all the filelds exposed by the draged ejb. I have experimented with Netbeans 5.5 to understand how to use visual development of a web application along with the ejb projects.

The new process is

Create EJB project as usual , Create VisualWeb application

Write a custom Dataprovider  by extending ObjectListDataProvider and Write a Custom Sorter extending TableDataSorter

Handle paging in DataProvider

Handle Sorting in TableDataSorter

Add Dataprovider and TableDataSorter as properties of SessionBean1 , Bind these properties to the table component.

Add Button ui components to your page which will handle the paging events.

I have explaind the detailed process in my previous blog

No comments: