Search in sources :

Example 1 with CarTablePmo

use of org.linkki.samples.dynamicfield.pmo.CarTablePmo in project linkki by linkki-framework.

the class DynamicFieldUI method init.

@Override
protected void init(VaadinRequest request) {
    Page.getCurrent().setTitle("Linkki :: Dynamic Fields Sample");
    List<Car> carStorage = getCarStorage();
    BindingContext bindingContext = new BindingContext();
    TableSection<CarRowPmo> table = new DefaultPmoBasedSectionFactory().createTableSection(new CarTablePmo(carStorage, () -> new NewCarDialog(carStorage, bindingContext::updateUI)), bindingContext);
    setContent(table);
}
Also used : NewCarDialog(org.linkki.samples.dynamicfield.components.NewCarDialog) DefaultPmoBasedSectionFactory(org.linkki.core.ui.section.DefaultPmoBasedSectionFactory) Car(org.linkki.samples.dynamicfield.model.Car) CarTablePmo(org.linkki.samples.dynamicfield.pmo.CarTablePmo) BindingContext(org.linkki.core.binding.BindingContext) CarRowPmo(org.linkki.samples.dynamicfield.pmo.CarRowPmo)

Aggregations

BindingContext (org.linkki.core.binding.BindingContext)1 DefaultPmoBasedSectionFactory (org.linkki.core.ui.section.DefaultPmoBasedSectionFactory)1 NewCarDialog (org.linkki.samples.dynamicfield.components.NewCarDialog)1 Car (org.linkki.samples.dynamicfield.model.Car)1 CarRowPmo (org.linkki.samples.dynamicfield.pmo.CarRowPmo)1 CarTablePmo (org.linkki.samples.dynamicfield.pmo.CarTablePmo)1