Hi
i’m evaluating Vaadin and run into a simple newbie question …
i have a simple table of based on a BeanItemContainer. When i click a row in the table I want to change the underlying object. (e.g. assign the object (an issue) to the current user).
I implemented the clickhandler to perform the logic. Debugging shows the logic is executed. But my table does not show the result, even after a requestRepaint(). Clicking on the headers to force a sort does repaint the table and shows the results. What am I missing here?
private IssueTable createSprintLog() {
sprintLog = new IssueTable();
sprintLog.setContainerDataSource(new IssueContainer(DataGenerator
.createIssueTestData()));
sprintLog.setVisibleColumns(IssueTable.NATURAL_COL_ORDER);
sprintLog.setColumnHeaders(IssueTable.COL_HEADERS_ENGLISH);
sprintLog.setSizeFull();
sprintLog.setSelectable(true);
sprintLog.setImmediate(true);
sprintLog.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(ValueChangeEvent event) {
Issue current = ((BeanItem<Issue>) sprintLog.getItem(sprintLog.getValue())).getBean();
if (loggedInUser != null) {
loggedInUser.assignIssue(current);
current.setStatus(IssueStatus.PROGRESS);
userTable.requestRepaint();
sprintLog.requestRepaint();
} else {
mainWindow.showNotification("Plz select a user",
"To make assigning possible",
Window.Notification.TYPE_HUMANIZED_MESSAGE);
}
}
});
calling the sort programmatically also does the trick.