1

I am using a Nattable inside a eclipse ViewPart. My RCP application is such that, each time I open the view, the table can have different columns based on the datamodel(represented by a different POJO) I wish to display.In short, can I do something like the below? : `

IWorkBenchPage page = .....;
MyView view = page.openView(MyViewID,"myview",VIEW_ACTIVATE);
IDataProvider dp = ....;
// the following statement will set the dataprovider, the necessary layers
view.dataProvider(dp);
view.getTable().refresh();
....

`

John Saunders
  • 160,644
  • 26
  • 247
  • 397
ssdimmanuel
  • 448
  • 10
  • 29

1 Answers1

1

I Believe this is possible, if you change the data provider (including the column accessor).

I have a similar situation in my product, and I found that the easiest way is to dispose the old table and recreate a new table with the new data.

Arye Shemesh
  • 582
  • 7
  • 20