*
The moose likes HTML, CSS and JavaScript and the fly likes how to show same row  for each click on a link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic
Author

how to show same row for each click on a link

preethi venkatarangan
Greenhorn

Joined: Jan 21, 2007
Posts: 27
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


i can provide you a gyst of my code ..its not a working codeit has a lot of syntax errors but it would be nice if someone could show in that
code how to achieve what i have mentioned above.it does not have the formbeans & all.i jus modified it to make it simple
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60732
    
  65

Please do not post the same question more than once. If you want to amend your question, please do so in the original topic.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to show same row for each click on a link
 
Similar Threads
Adding UI controlls dynamically
component execution order
struts2 drop down - unique values
ice:selectOneMenu not refreshing
How to show a textfield dynamically using struts..(URGENT)