Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

selecting a table row with 3 columns and sending it to another page.

 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a page with three text boxes and a add button. on click of the button another page opens which has a table with 3 columns and 10 rows(all static data). Any one row can be selected at a time and on submit the selected row values has to come to the three text boxes. I using struts framework.

I had done the jsps, but couldn't proceed with how to implement the submit of selected row to the text boxes.

Any suggestion is highly appreciated.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From your question I got to know the following. You have 3 text boxes and an "Add" button. when you click on the add button you open a popup(or next page as the case may be) which has a table with 3 columns and lot of rows. When you click on one of the row you want the data of that row to be populated in the main page.

If you are using a popup then you can use javascript to get the data of the popup and populate the main page and close the popup.

If you want having the data on a page and you want to fwd it to the page which has 3 textbox and add button. You can do a submit of the form to a url(this url should be something.do) and pass the parameter like Id=1001, in your struts action you can get the id and do the processing and fwd it to the page you want.

Hope this helps.

Thanks,
Amit Tank
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one kindly give me more input to this?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic