After reading javadoc, I think your code should never print ok.
But when I looked at the source for the
getItemProperty()
in the implementation of Item in the class IndexedContainerItem, I found that the method always return a new object
/*
* (non-Javadoc)
*
* @see com.vaadin.data.Item#getItemProperty(java.lang.Object)
*/
public Property<?> getItemProperty(Object id) {
return new IndexedContainerProperty(itemId, id);
}
So what’s is wrong : this method above or javadoc ?..
Hope Vaadin guys see that post and give us an explanation.