Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to show the same row for each click on the link..

Status
Not open for further replies.

13jul

Programmer
Feb 6, 2008
1
Hi..
I have a row which has a drop down list with values(One,Two,Three)
and next to the dropdown i have a single textfield.(these values are set in a get/set
methods of a bean instance called "OneBean").the unique id of this row is "id1"

I have an other row which has a drop down list with values(One,Two,Three)
and next to the dropdown i have a two textfield.(these values are set in a get/set
methods of a bean instance called called "TwoBean").the unique id of this row is"id2"

I have a 3rd row which has a drop down list with values(One,Two,Three)
and next to the dropdown i have a 3 textfields.(these values are set in a get/set
methods of a bean instance called called "ThreeBean").the unique id of this row is"id3"


Now i also have another row which has a drop down list with values(One,Two,Three)
and next to the dropdown i have a single textfield.the unique id of this row is"commonid"


By default i show only the first row which is id1 .
now i have one Add link

when the user clicks "Add" the first time i show the row with id="commonid" .No problem with this.
when the user again clicks "Add" i want to show the same row again that is the row with id="commonid" .Is there a way to do this.


the reason i want this is when i click add i want to show the "commonid" row by default & then when he selects
values from the dropdownlist i want to show the corresponding row equivalent to that value & also set it to the corresponding formbean.
that is when user selects some value from the dropdown
then i need to hide the row with id="commonid" & show
the row for the selected value.Say if the user selects 'One' from dropdownList
then i need to replace 'commonid'row with the row of'id1'. if user selects 2 from dropdownlist then it should replace the existing row(whether it is first row or the third row) with second row
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top