Only one filled column in a JFace TableViewer

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 auf Twitter teilen
Only one filled column in a JFace TableViewer flattrn
Only one filled column in a JFace TableViewer auf Digg teilen
Only one filled column in a JFace TableViewer auf Delicious teilen
Only one filled column in a JFace TableViewer auf Xing teilen
Only one filled column in a JFace TableViewer auf LinkedIn teilen
Only one filled column in a JFace TableViewer auf Pinterest teilen
Only one filled column in a JFace TableViewer auf StumbleUpon teilen
Only one filled column in a JFace TableViewer auf Tumblr. teilen
Only one filled column in a JFace TableViewer auf Pocket weiterlesen
Dominik Schadow auf Feedly abonnieren

6 Replies to “Only one filled column in a JFace TableViewer”

  1. Me tooooo !! thanks (it’s been like 2 hours, but could have been all night long 😀 )

  2. I’m joning to all above and many thanks! 🙂
    (I’ve got same problem and it’s already been killed 4 hours before.)

Comments are closed.