Table with an SQLContainer as data source how to getValue

i using Table with an SQLContainer as data source Iike to do next when i click on row i want to get values from clicked row

I try this bu i get a error

Item item = table.getItem(table.getValue());
					String tableString = item.getItemProperty("department_name").toString();


EVERE: Terminal error:
com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in com.BTicket.MenuModules.ShowDepartment$1 failed.
	at com.vaadin.event.ListenerMethod.receiveEvent(
	at com.vaadin.event.EventRouter.fireEvent(

Caused by: java.lang.NullPointerException
	at com.BTicket.MenuModules.ShowDepartment$1.valueChange(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.vaadin.event.ListenerMethod.receiveEvent(
	... 30 more

At the moment i solved this
But a have a problem a set the table to


How to get the selected rows in to a array ???

The way how a select values from tables

table.addListener(new ItemClickListener() {
				public void itemClick(ItemClickEvent event) {
				 Property property = table.getContainerProperty(event.getItemId(), "id");
				 Object value = (null != property) ? property.getValue() : null;
                      selected.setValue("Selected: " + value);


When a selection compoent is in multi-select mode, its value is a Set of item identifiers, not a single identifier. This applies to both setting and getting the value.