Bug 127861 [DataBinding] Mark API provisional
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java
if (!display.readAndDispatch())
            display.sleep();
      }
      display.dispose();
   }
   
   Model model = new Model();
   private void bind(Control parent) {
      IDataBindingContext dbc = BindingFactory.createContext(parent);
      TableViewer peopleViewer = new TableViewer(personsTable);
      dbc.bind(new Property(peopleViewer, ViewersProperties.CONTENT),
				new TableModelDescription(new Property(model, "personList"),
						new Object[] { "name", "state" }), null);
      
      IUpdatable selectedPerson = dbc.createUpdatable(new Property(
				peopleViewer, ViewersProperties.SINGLE_SELECTION));
      
      dbc.bind(name, new Property(selectedPerson, "name", String.class, Boolean.FALSE), null);
      dbc.bind(address, new Property(selectedPerson, "address", String.class, Boolean.FALSE), null);
      dbc.bind(city, new Property(selectedPerson, "city", String.class, Boolean.FALSE), null);
      dbc.bind(state, new Property(selectedPerson, "state", String.class, Boolean.FALSE), null);
      
      TableViewer ordersViewer = new TableViewer(ordersTable);
      dbc.bind(new Property(ordersViewer, ViewersProperties.CONTENT),
				new TableModelDescription(new Property(selectedPerson,
						"orders", List.class, Boolean.TRUE), new Object[] {
						"orderNumber", "date" }), null);
   }
}