Filling of the right field in TwinColSelect

I welcome!

You couldn’t prompt how to fill the
right
field in TwinColSelect by analogy -


...
TwinColSelect l = new TwinColSelect();        
for (int i = 0; i < cities.length; i++) {            
   l.addItem(cities[i]
);			
}        

private static final String[] cities = new String[]
 { ... };
...

For example, if I need to remember the points chosen earlier and then to restore a condition of TwinColSelect…

The right column contains the selected items, so you can set it with setValue().

TwinColSelect l = new TwinColSelect();
for (int i = 0; i < cities.length; i++)
	l.addItem(cities[i]
);

Set<String> selection = new HashSet<String>();
selection.add("Turku");
selection.add("Paris");

l.setValue(selection);

I welcome you, Henri Muurimaa!

Thank you very much! It works! :smiley: