April 2018
Intermediate to advanced
202 pages
4h 48m
English
The create CRUD operation starts when the user clicks the add button. Similarly, the update CRUD operation starts when the user clicks the update button. We need the following infrastructure code:
...private void initBehavior() { ... add.addClickListener(e -> showAddWindow()); edit.addClickListener(e -> showEditWindow());}private void showAddWindow() { UserFormWindow window = new UserFormWindow("Add", new User()); getUI().addWindow(window);}private void showEditWindow() { UserFormWindow window = new UserFormWindow("Edit", grid.asSingleSelect().getValue()); getUI().addWindow(window);}
When any of the buttons is clicked, we show a UserFormindow (implemented shortly). For the add button, we pass ...
Read now
Unlock full access