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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

how to show same row for each click on a link

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not post the same question more than once. If you want to amend your question, please do so in the original topic.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic