Crud UI Add-on

You are probably adding the window more than once.

Thanks Alejandro. You were quite right - I was doing exactly that.
I still receive an exception using the above custom field but leaving that aside …

whats the expected way of using the form factory to create nested forms for nested entities - such as an address in a person object.

many thanks,
Jason

Jason, if you mean CrudFormFactory, then adding a field provider is the way to go.

Hi Alejandro, now that the crud ui add-on has been stabilized, could you look into add-on reports as promised? In case you do not have time, how could we migrate the enterprise-app report module?

Regards

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

Jason, I don’t want to couple the add-on to specific persistence technologies. All the interaction with the actual data is delegated to crud listeners, those can handle pagination or any other data-level details

Hi Alejandro

I am following the examlpes that you provided in the Testui. I would like to extend the formlayout so that if I throw a crudOperationException the error that I provide should be displayed on the existing form. Currently what happens is the the edit/add form is hidden/removed and then notification is displayed on the grid.

When adding/ editing the row in question again, the previously captured form details are still there. I would then like to focus the field the caused the error as well

Go ahead! You may want to contribute that implementation to the add-on on GitHub through a push request.

Hi Alejandro,

Do you have any examples of how to use the crud form with bean validation so it doesn’t close if there’s an error and waits till the user fixes the error?

Thanks!

Hi Arindam,

I’m not sure what you mean. Is the modal window closing for you somehow? It works okay for me without having to do much.

Hey Alejandro,

So if some of my bean fields are marked with @NotNull or other validation specs and these fields are not filled in or filled in correctly how would i prevent the form from being closed? I want the user to be able to fix their entries and then try to create/update the pojo.

Thanks

It should work. Users are able to fix the validation errors. Did you add the Bean Validation dependency to your project?

so far I have the following,

and other logging deps

Hibernate Validator requires an EL implementation, did you add those dependencies as well?

yes, I followed the instructions on http://hibernate.org/validator/documentation/getting-started/

javax.el-javax.el-api:2.2.4
org.glassfish.web-javax.el:2.2.4
org.hibernate-hibernate-validator-cdi:5.3.4.Final

The current behavior is if i leave all the fields empty and hit ‘Add’ it says ‘Item saved’ and closes the dialog

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!

Great!

Hi.

I noticed strange behaviour, after updating the record. Update is executed to database, but grid record stays unselected, even stanger, I can not select updated record any more.
I’ve checked database record, it’s updated.

I have BaseEntity as superclass for all entities. I suspect equals method or maybe lombok.
Any clues?

It’s definately equals.