The moose likes HTML, CSS and JavaScript and the fly likes Web editable table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Web editable table" Watch "Web editable table" New topic

Web editable table

Dmitry Fedorovich

Joined: Sep 06, 2010
Posts: 8
Good day, guys...
I`m not sure i write in the correct section, but still...

The point is - i`m writing a java web (Servlet based) application, and i need to show the user a data table.
That table should be able to show data, filter it, find by some parameter and even allow user to change data (and data must be changed in database too).

I can write my own HTML table, which sends web requests via AJAX-to-SERVLET way. And in servlet logic select new data, or modify database, BUT. It will take sooo long.

So is there any good and flexible engine with such functionality?
As a resume - i need:
1) Show user data from my database (as a table)
2) Allow user to sort, filter and CHANGE data (data in database also must be changed)
3) It must work through AJAX (no page reload in any user`s action)

Thanks a lot.
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

If you can use JQuery, there are some interesting plugins for tables, especially DataTables. Check here.

[My Blog]
All roads lead to JavaRanch
Dmitry Fedorovich

Joined: Sep 06, 2010
Posts: 8
Yes. But they don`t support editing. Also i need server side logic to manipulate with database. In PHP cake framework can do the trick...
But i`m looking for the same in java...
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

You should use Javascript DOM API for creating a TextNodes filling with Data Dynamically .

Some sample code

This is very basic , you need to do a lot of R&D work on Javascript DOM API to achive this functionality .

If you face any problems , post your questions in HTML and Javacript Forum on Coderanch to get better answers

Save India From Corruption - Anna Hazare.
Albareto McKenzie
Ranch Hand

Joined: Apr 08, 2009
Posts: 299
I don't know how that can be achived by using only your own Javascript, but if you don't mind using a library continue reading:

That can be done using ExtJS very easily, check out this example:

This is the library's site:
I agree. Here's the link:
subject: Web editable table
It's not a secret anymore!