File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Passing Table values to action class 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 "Passing Table values to action class" Watch "Passing Table values to action class" New topic

Passing Table values to action class

Vijay jai Singh

Joined: Jan 07, 2009
Posts: 26
In one of my web page i have HTML table. This table will have 0 or more rows and each row has 3 column.

it is like this:

i want to transfer values of columns to Action class.

is there any way to
1) get number of rows in table
2) transfer values using javaScript and how will i get in my action class.

Pradeep Adibatla
Ranch Hand

Joined: Oct 27, 2009
Posts: 336
requirement is not clear .Be more detailed... how are values set in the table??
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32811

1) You can look through the DOM using JavaScript. It's easier if you use a library like jQuery to do so.
2) You can transfer the values to a hidden form field and submit that in your form.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Passing Table values to action class
It's not a secret anymore!