Displaying arraylist property as columns using BeanItemContainer

I have requirement where I want to show the arraylist values in columns using BeanItemContainer. Below is more elaboration on requirement.


public class Student{
private String name;
//subject the student opted for. this can be any size but all the student will have
//same length
private List subjects;

/* setters and getters*

[/code]I want to display this bean in table where each subject will be a column. Also I need binding so when in editable mode the values should get written back to arraylist. Is there a way to achive this without writting any customized code?

If not, then what would be better way ? writting custom container or extending table itself? Please suggest!!

So if the list contains different number of elements then the resulting table rows might contain different number of columns…
this seems logically worng.
if this is a static length list… you can use addGeneratedColumn method for each member of this list.