• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transferring data between two lists

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • 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
 
Jason Cox
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • 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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic