use of org.linkki.core.binding.DefaultBindingManager in project linkki by linkki-framework.
the class BindingSampleUI method init.
@Override
protected void init(VaadinRequest request) {
Page.getCurrent().setTitle("linkki Sample :: Bindings");
List<Contact> personStorage = new ArrayList<>();
BindingManager bindingManager = new DefaultBindingManager(ValidationService.NOP_VALIDATION_SERVICE);
BindingContext context = bindingManager.startNewContext("binding-sample");
ContactComponent contactComponent = new ContactComponent(p -> save(p, personStorage), context);
ContactsTableComponent contactsTable = new ContactsTableComponent(personStorage, contactComponent::editContact, context);
bindingManager.addUiUpdateObserver(contactsTable);
HorizontalSplitPanel panel = new HorizontalSplitPanel(contactComponent, contactsTable);
panel.setLocked(true);
setContent(panel);
}
Aggregations