Bookstore { Book[] books ... }
<ListViewer input="{Binding Path=this}">
// this works <ListViewer input="{Binding Path=books}">
My EMF domain looks something like this:
Bookstore { Book[] books ... }
How do I bind an instance of Bookstore, which is my top level object to the input of a JFace viewer?
i.e.,
<ListViewer input="{Binding Path=this}">
Rather than
// this works <ListViewer input="{Binding Path=books}">
Thanks,
-S.
You would have to introduce a wrapper (domain) class and use an instance of that as your data context. You can either model this explicitly (if your Bookstore has no container) or create a simple POJO/Bean:
class BookstoreWrapper {
Bookstore bookstore;
...
}
Keep in mind that a ListViewer is suited to showing one of many options in a list.
I assume you have multiple Bookstores that have to be shown in the ListViewer?
Sharon Dagan wrote on Wed, 11 December 2013 20:26My EMF domain looks something like this:
Bookstore { Book[] books ... }
How do I bind an instance of Bookstore, which is my top level object to the input of a JFace viewer?
i.e.,
<ListViewer input="{Binding Path=this}">
Rather than
// this works <ListViewer input="{Binding Path=books}">
Thanks,
-S.