Hello everyone!
I’ve implemented a new Vaadin add-on to generate CRUD-like interfaces at runtime:
https://vaadin.com/directory#!addon/crud-ui-add-on
This add-on defines a set of interfaces that are useful to implement CRUD-like UIs. There are at least one implementation for each interface, but I’m planing to implement new ones. You can also implement your own (and
contribute
them?).
Supose you have a
User
class (a Java bean) and you want to show a CRUD UI for it. All you have to do is something like this:
GridBasedCrudComponent<User> crud = new GridBasedCrudComponent<>(User.class);
layout.addComponent(crud);
// use lambda expressions or method references to delegate CRUD operations to your backend:
crud.setAddOperation(user -> backend.add(user));
crud.setUpdateOperation(backend::update);
crud.setDeleteOperation(backend::delete);
crud.setFindAllOperation(backend::findAll);
See the examples provided in the add-on page for more advanced use cases.
Issues and code contributions are welcome on GitHub:
https://github.com/alejandro-du/crudui
Hope you find it useful!