Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Crud UI Add-on

Alejandro Duarte
5 years ago Nov 09, 2016 6:51pm

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!

Johannes Häyry
5 years ago Nov 10, 2016 11:31am

Looks cool. I got to check it out.

Eric CHOUPE
5 years ago Nov 10, 2016 5:03pm

Hi Alejandro, I used the updated version of crudui add-on. Thank you for the improvements. I would like some recommendations to :
- prevent adding an empty record;
- send a confirmation request before a delete operation;
- treat a relationship type fields 1: n as CustomerStatus whose selection comboBox is fed from another table;
- specify the date format (dd / mm / yyyy) to the grid and the form.

regards,

 

Alejandro Duarte
5 years ago Nov 11, 2016 6:48pm
Jason Tan
5 years ago Nov 12, 2016 11:10pm
Eric CHOUPE
5 years ago Nov 13, 2016 6:44am
Alejandro Duarte
5 years ago Nov 13, 2016 10:38am
Jason Tan
5 years ago Nov 14, 2016 12:38am
Alejandro Duarte
5 years ago Nov 14, 2016 9:26am
Eric CHOUPE
5 years ago Nov 14, 2016 10:40am
Alejandro Duarte
5 years ago Nov 14, 2016 1:51pm
Alejandro Duarte
5 years ago Nov 14, 2016 7:45pm
Eric CHOUPE
5 years ago Nov 15, 2016 8:17pm
Alejandro Duarte
5 years ago Nov 15, 2016 11:50pm
Eric CHOUPE
5 years ago Nov 16, 2016 8:10am
Alejandro Duarte
5 years ago Nov 16, 2016 9:29am
Eric CHOUPE
5 years ago Nov 17, 2016 11:30am
Alejandro Duarte
5 years ago Nov 17, 2016 11:45am
Eric CHOUPE
5 years ago Nov 17, 2016 11:54am
Jason Tan
5 years ago Nov 17, 2016 1:43pm
Alejandro Duarte
5 years ago Nov 17, 2016 1:51pm
Jason Tan
5 years ago Nov 17, 2016 5:38pm
Alejandro Duarte
5 years ago Nov 17, 2016 7:47pm
Eric CHOUPE
5 years ago Dec 06, 2016 5:36am
Jason Tan
5 years ago Dec 12, 2016 2:44pm

@Alejandro - how do you feel about support for paging of db result sets?

Alejandro Duarte
5 years ago Dec 12, 2016 3:30pm
Ebrahim Jogee
5 years ago Dec 26, 2016 10:43am
Alejandro Duarte
5 years ago Dec 28, 2016 7:46pm
Arindam Paul
5 years ago Jan 17, 2017 4:07pm
Alejandro Duarte
5 years ago Jan 18, 2017 11:32am
Arindam Paul
5 years ago Jan 18, 2017 1:42pm
Alejandro Duarte
5 years ago Jan 18, 2017 1:48pm
Arindam Paul
5 years ago Jan 18, 2017 2:00pm
Alejandro Duarte
5 years ago Jan 18, 2017 2:13pm
Arindam Paul
5 years ago Jan 18, 2017 2:44pm
Alejandro Duarte
5 years ago Jan 18, 2017 2:59pm
Arindam Paul
5 years ago Jan 19, 2017 8:04am

Alejandro Duarte: Well, it works for me. Are you able to provide a minimal project I can compile and execute to reproduce the issue?

Creating a minimal project isolated the issue. I was using Immutables to generate my pojos and that didn't play well with the validation annotations for some reason. hand coding them has fixed the issue. thanks again for your help, I appreciate it!
 

Alejandro Duarte
5 years ago Jan 19, 2017 10:45am
uros kristan
5 years ago Mar 16, 2017 8:32pm
uros kristan
5 years ago Mar 16, 2017 9:12pm