Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 3 weeks ago
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
Last updated on Jun, 14th 2012
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);
}});
Last updated on Jun, 14th 2012
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.
Last updated on
You cannot reply to this thread.