0

I am developing a small application. I am stuck in one of the scenario where I have to load data into table viewer after clicking TreeViewer item. Please suggest me way to handle this issue.

public void handleEvent(Event event) 
{
    TableViewer m_tableviewer.setData("Item Selected", event.item);
    // m_personViewer.setText(event.item + " was selected");
} 
Baz
  • 36,440
  • 11
  • 68
  • 94
Prashant P
  • 21
  • 4
  • 1
    That is not valid Java syntax. Please elaborate and explain what exactly you want to achieve. – Baz Oct 08 '12 at 08:59
  • For example when i click on button, it will load Tree. Now from Tree item...i i have to select one of the item will will again display Table related to tree item – Prashant P Oct 08 '12 at 09:05
  • Are you sure you want to use a `TableViewer` and not simply a `Table`? What kind of data does the `TableViewer` represent? – Baz Oct 08 '12 at 09:07
  • 1
    Prashant P you can edit your original post to add more information. It is easier for people to read and understand what you are trying to do. Please add all necessary details. – Deepend Oct 08 '12 at 09:08
  • I want to use Table viewer and data is currently hard coded. But it will come from Form Textt field and stored in table. – Prashant P Oct 08 '12 at 09:08
  • I have query regarding SWT/Jface. We have multiple buttons (for eg... B1, B2, B3...). Each button on click will load tree items (using tree viewer), For example (B1->t1,B2->t2,B3->t3..etc). and these trees are loaded in single composite frame. So when i click on B1, it will display T1 tree viewer, but now i want to click on B2, T2 is not displayed. So my question is how can i dynimically change the tree viewer display on each button seperate click sitting in same composite. – Prashant P Oct 10 '12 at 07:42

0 Answers0