File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Grid using Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Grid using Struts" Watch "Grid using Struts" New topic

Grid using Struts

krish mani

Joined: Aug 22, 2005
Posts: 1

I have a grid which has few rows with 4 columns, i want to tranfer each row which is selected in the grid to another grid by clicking ">>" button.

How can this be achieved in STRUTS???

I appreciate a quick response.

Horatio Westock
Ranch Hand

Joined: Feb 23, 2005
Posts: 221
This isn't really a struts specific problem. I can think of two approaches:

1. Prepare your data as two collections, one for each table. Display your data as normal and have a radio button which corresponds to each row. When the >> button is clicked, the form is submitted and you have an appropriate action which moves the data associated the radio button to the other collection. Then forward/redirect back to your display jsp (assuming you are using jsp).

2. Use javascript to alter the html of the page when the button is clicked.

The approach you take really depends upon whether you want to have a round trip to the server each time the button is clicked, whether the client is likely to have javascript enabled etc. etc. etc.
I agree. Here's the link:
subject: Grid using Struts
It's not a secret anymore!