• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Grid using Struts

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic