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();
					System.out.println(tableString);
					
					table.getVisibleColumns();

ERROR



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(ListenerMethod.java:532)
	at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
                                                           ......................


Caused by: java.lang.NullPointerException
	at com.BTicket.MenuModules.ShowDepartment$1.valueChange(ShowDepartment.java:84)
	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(ListenerMethod.java:512)
	... 30 more


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

[b]
table.setMultiSelect(true);
[/b]

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.