Hello,
I have a little problem, I have a table displaying data from my database with the jpacontainer addon.
Everything works really well.
But I am updating some data somewhere else.
If I refresh the browser updated values are well updated in the table. But I have to force refresh without using F5 key
So I created something like this :
public void refresh()
{
for(Object itemId : container.getItemIds())
{
container.refreshItem(container.getItem(itemId));
}
}
And it failed, and generate an null pointer exception :
Caused by: java.lang.NullPointerException
at com.vaadin.addon.jpacontainer.JPAContainer.refreshItem(JPAContainer.java:1649)
at MyTable.refresh(MyTable.java:168)
at MyGui$1.buttonClick(MyGui.java:96)
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:512)
... 31 more
And I don’t realy understant why.
Can someone give me some help ?
Thanks for all your great work.