wood burning stoves 2.0*
The moose likes JSP and the fly likes Populating dynamic data into fields Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Populating dynamic data into fields" Watch "Populating dynamic data into fields" New topic
Author

Populating dynamic data into fields

pramodh somashekara
Ranch Hand

Joined: Jan 30, 2006
Posts: 62
Hi, We have a table of data at the top of the JSP page and a set of fields corresponding to each column at the bottom of the page. The data of table is populated from the database whenever the page is opened.

I want to be able to click on a particular row of the table and populate the data corresponding to that row in the following fields.

What is the best way to implement this?
Rusty Smythe
Ranch Hand

Joined: Aug 09, 2006
Posts: 93

Javascript is probably the easiest way, and it will be the most responsive to the user.
reddy yeruva
Greenhorn

Joined: Oct 18, 2006
Posts: 18
hai

first pass the record id to javascript function on click event wirte

location='page.jsp?id='+value;

value means your record id

then in the page get the value using request.getParameter("id");
pass this id to your query then display the result set in a table format..


i hope this solves your problem


Y.Tirupati Reddy<br />reddy.yeruva@gmail.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Populating dynamic data into fields