From: albert kao on
I use the TableKit javascript library and JSP for displaying
scientific data. The size of my data sets are about 100-25000 rows and
5 columns. I would like to display the data for about 40 rows per
page. The user can click the "Next" and "Previous" button to go to
the next and previous page respectively. The user can go to the page
directly by clicking the page number "1", "2", "3", ... button.
Apache DB database and Tomcat server are running on Windows Vista
Home.
Should I implement this with TableKit javascript or JSP?
Any sample code or tutorial?
From: Lew on
albert kao wrote:
> I use the TableKit javascript library and JSP for displaying
> scientific data. The size of my data sets are about 100-25000 rows and
> 5 columns. I would like to display the data for about 40 rows per
> page. The user can click the "Next" and "Previous" button to go to
> the next and previous page respectively. The user can go to the page
> directly by clicking the page number "1", "2", "3", ... button.
> Apache DB database and Tomcat server are running on Windows Vista
> Home.
> Should I implement this with TableKit javascript or JSP?

Yes. No. Maybe. Depends.

> Any sample code or tutorial?

I'm not familiar with TableKit, but there no doubt is a good way for it to do
what you want. JSP can also do what you want, with judicious use of standard
tags and some custom work, or by using Java Server Faces (JSF) or libraries
based on JSF.

JSF components often use Javascript to enhance their utility.

You can find sample code and tutorials for JSP and JSF, and presumably
TableKit, by visiting the respective sites or by using your favorite search
engine.

For example, the JSF Tomahawk library has a tag 't:dataTable' that presents a
scrollable table with an arbitrary number of rows to display at a time.
<http://myfaces.apache.org/tomahawk-project/tomahawk12/tlddoc/t/dataTable.html>

It, in turn, is based on the standard JSF 'h:dataTable', which has the
features you asked for.
<http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/h/dataTable.html>

There's a simple tutorial on that component at
<http://www.oracle.com/technology/oramag/oracle/06-jan/o16jsf.html>

It only took me a few minutes search from java.sun.com to find that.

--
Lew