• Post Reply 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transferring data between two lists

 
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP where in I would like to transfer the contents of one list to another via a button.

Source List Target List
------------ ------------
Foo Bar
Test Add Bar 2
Test 2 Rem Bar 3
Test 4 Bar 4

I am hoping to use dispatch action and JSP to get this to work. Does anyone have a sample JSP and/or suggestions on the best way to accomplish this?

Thanks
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would this be two lists inside of a form on the page? Is the output text, a select field, a textbox?

I'm not sure I completely understand the question. There are many ways to share information between two lists on a page, but it largely depends on the context you plan on sharing them.

I am assuming the actual information comes from the back-end as well.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're transferring options from one select box to the other, I'd suggest using JavaScript.

This link shows a demo of this and allows you to download the JavaScript code.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry about the delay. Yes the actual information comes from the back end.
So we would have two lists, one list of currently assigned items and a second list of items that can be assigned. I want to be able to transfer between one list to another. I am aware that this can be done using javascript. Was checking if someone has implemented where clicking on Add takes one to the Action class and returns?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic