selectedUsersTable.setColumnHeaderMode(Table.COLUMN_HEADER_MODE_HIDDEN);
selectedUsersTable.setEditable(false);
selectedUsersTable.setSortDisabled(true);
// Icon column
selectedUsersTable.addGeneratedColumn("icon", new ThemeImageColumnGenerator(Images.USER_ADD));
selectedUsersTable.setColumnWidth("icon", 16);
// Name column
selectedUsersTable.addContainerProperty("userName", String.class, null);
// Role column
if (showRoles) {
selectedUsersTable.addContainerProperty("role", ComboBox.class, null);
}
// Delete icon column
selectedUsersTable.addGeneratedColumn("delete", new ThemeImageColumnGenerator(Images.DELETE,
new com.vaadin.event.MouseEvents.ClickListener() {
public void click(com.vaadin.event.MouseEvents.ClickEvent event) {
Object itemId = ((Embedded) event.getSource()).getData();
// Add to left table (if possible)