Hello Vaadin experts,
I have a doubt in twin column select.
final TwinColSelect crops = new TwinColSelect();
CropContainer cropContainer = CropContainer.createWithTestData();
for (Crops crop : cropContainer.getItemIds()) {
crops.addItem(crop.getCrop());
}
crops.setRows(10);
crops.setNullSelectionAllowed(true);
crops.setMultiSelect(true);
crops.setImmediate(true);
crops.setLeftColumnCaption("Available Crop's");
crops.setRightColumnCaption("Selected Crop's");
crops.setWidth("350px");
By using crops.getValue() I am getting all te values from the right column. My problem is to iterate through the values of the right column and get the individual values.
I tried hash set ,list and iterate throught it but I am getting the following error
Caused by: java.lang.ClassCastException: java.util.Collections$UnmodifiableSet cannot be cast to java.util.HashSet
at com.zoraly.agridoc.masterregistrations.FarmerInfo$8.buttonClick(FarmerInfo.java:4368)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:490)
… 22 more
Please Help me
Thanks and Regards,
Siva.