Error during Table cache update

Hello, I have a problem with my code, but I dont know what matter.
This is the message when I run the code.

[code]
private void initializeUserTable(){
userContainer = new BeanItemContainer(User.class);
userTable.setSelectable(true);
userTable.addListener((Property.ValueChangeListener) this);
userTable.setNullSelectionAllowed(false);
userTable.setContainerDataSource(userContainer);

    System.out.println("Inicializa TABLETA");    
    
    String[] columns = {"hospital", "login", "email","enable", "passwd", "rol","name"};
    userTable.setVisibleColumns(columns);
    
    populateUserTable();
    System.out.println("ACTUALIZo... TABLETA")     
    
}

[/code][code]
private void populateUserTable(){

    List<User> users = new ArrayList<User>();               
    userManager = new UserManagerImpl()
    users = userManager.findAll();                   
                userContainer.addAll(users);                                             
             }
    }   
}  

[/code]User have several fields like name, login, email, …

thanks!

Hi,

I can’t see any error message in your post. Anyway, it would be better to call setContainerDataSource only after the container has been populated - visible columns can be set after that.

-tepi

oks, thank you tepi!