• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Dealing with Jlist

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one frame in which i have a Jlist box.
AllGroupList
the AllGroupList populates some user name dynamically.
Now i have a edit button for that Jlist box.
The edit button will open a dialog.
The dialog will have two list box and search button to search new users so we can add users.
1) AvailableGrp_list
2) currentgrpmembership_listbox

currentgrpmembership_listbox is filled up when i call the dialog(by passing frame list model)

AvailableGrp_list is filled up by the search criteria

My problem is that when ever i add an element in the dialog from AvailableGrp_list to currentgrpmembership_listbox it gets added but at the same time the element also gets added in parent frame list AllGroupList.

why is it so?
Is this the correct way to pass a list from one frame to other dialog if we need the dialog to be initialized by a list from calling frame?

Once the user selects the users to be added, i want to load my AllGroupList(present in frame) with currentgrpmembership_listbox (which the user will upadte from dialog) can some one help in that also?

Frame code


Dialog Code



[ November 14, 2008: Message edited by: Raj kalaria ]
[ November 14, 2008: Message edited by: Raj kalaria ]
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ray,

it seems to me that you need to create a second model for currentgrpmembership_listbox. You share pass your model to your target list, which means it is beeing shared by the listbox in the frame.

Kind Regards
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic