File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Grid using Struts" Watch "Grid using Struts" New topic
Author

Grid using Struts

krish mani
Greenhorn

Joined: Aug 22, 2005
Posts: 1
Hi,

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.

thanks,
Krish
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: http://aspose.com/file-tools
 
subject: Grid using Struts
 
Similar Threads
f:ajax and client-side components
JQuery Grid in struts 1.3
Data grid
I have used Dojo and I want to know
Struts2-json plugin not serializing action class to json