Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Struts: List Box problem

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am working on a project where on a jsp there are two different listbox. My job is to transfer the content of one list box to another, which is working fine. But problem comes when the list box is submitted to action class. That is once the data is submitted to the form, the data becomes available to action class, now if i come back to the list box in user interface and clear the contents of list box same is not reflected in the form bean and it's still retaining the values

Please help.

here is the code that i have written for list box
List Box 1:

List box :2


when all the contents of the list box are empty the form bean is still showing that data is available


Here is what I am trying to do. (Please see the screen shot for clarification)
Step 1: In "Export" tab, from "Available Partners" I am transfering the contents to "Assigned Partners" box
Step 2: I am navigating to "Import" tab and will do some changes there
Step 3: I will come back to "Export" and i will remove all the contents of "Assigned Partners" and put it back into "Available Partners" box (At this stage the form still holds the previous contents already assigned)
Step 4: I will navigate to some other tabs like "Import"
Step 5: Now when I check the "Available Partners" box, it shows the contents previously assigned, but in "Step 3" i have removed all the contents

Please help.
Regards
Dilip H P




List-Box.png
[Thumbnail for List-Box.png]
List-Box2.png
[Thumbnail for List-Box2.png]
 
Ranch Hand
Posts: 99
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can do a clean for your list box values when using javascript to send back those fields.

-M.
 
Dilip H Pashupathi
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you tell me how to clean those lisbox. because from javascript i tried all sorts of things. And nothing seems to wokr. And if I completely empty the box by selecting all the values and clicking on the "Remove" button, the same is not reflected in the form bean.

Please help.

Thanks
Dilip H P
 
There's a way to do it better - find it. -Edison. A better tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic