• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Grid using Struts

 
krish mani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic