I prepared a TableViewer based view for a workshop today. And ran into a really, really nice problem. The TableViewer displayed all rows and columns, but only the first column was filled with data (since it was for demonstration purposes only I used some hardcoded data in an ArrayList). I checked everything, from LabelProvider to ContentProvider and the view itself. Finally I noticed (after a long, long time, it felt like weeks) that I was calling viewer.setInput(myArrayList) before setting the columns with TableColumn column = new TableColumn(…). Changing that solved my problem, all data was visible. I seems that JFace displays a simple list in this case, but sets all column headers and shows no error message at all.
Only one filled column in a JFace TableViewer
by
Tags:
Comments
6 responses to “Only one filled column in a JFace TableViewer”
Thanks, you saved my day and prevented me from becoming totally insane ;-).
Thanks, i met the same problem!
Bless you!
Me tooooo !! thanks (it’s been like 2 hours, but could have been all night long :D )
I’m joning to all above and many thanks! :)
(I’ve got same problem and it’s already been killed 4 hours before.)
Thanks so much!