Selected Value In Twin Column It's Not Show

Hi everybody,

I have a twin column, i have set value to selected column when build this component, but it’s not show the selected text and when i get all, it’s contains selected value. It’s Not Show on the selected column.

Please tell me about that.

Thank you !

I didn’t quite understand the exact nature of your problem, but maybe one of these threads would be helpful in your case as well:

TwinColSelect does not take default values or selections


TwinColSelect: how to use it in a BeanItem based form

I have set the data on right column by setValue(Object obj) but the data it’s not available on right column.

List<com.lr.hibernate.AvailableColumn> listColumn = columnDao.findAvailableColumn(getApplication().getUser().toString());
		HashSet<String> preselected = new HashSet<String>();
		for(com.lr.hibernate.AvailableColumnavailableColumn : listColumn)
		{
			String strColumn = availableColumn.getColumnLabel();
			if(!strColumn .equals("ID"))
			{
				preselected.add(strColumn);
			}
		}
		twinColSelect.setValue(preselected);
		twinColSelect.setImmediate(true);
		
		mainLayout.addComponent(twinColSelect, "top:20.0px;left:20.0px;");

Please help me to fix this problem !
Thank you !

Are you certain you have those values in ‘preselected’ already in your ‘twinColSelect’? You can’t move anything to the right column if it isn’t in the left column first.

For example, this should only show one item in the right column:

TwinColSelect twinColSelect = new TwinColSelect();
twinColSelect.addItem("String0");
twinColSelect.addItem("String1");
HashSet<String> preselected = new HashSet<String>();
preselected.add("String1");
preselected.add("String2");
preselected.add("String3");
twinColSelect.setValue(preselected);
twinColSelect.setImmediate(true);

Thanks a lot,
really help me to sort out my problem