Generalize composite browser/edit screen code through a delegate (gist attached)

Hi
I was tired of the boilerplate code that is generated for each composite lookup/edit screen by CUBA studio, so I wrote a simple delegate class that generalizes that code.

I suggest implementing the same or similar solution in next CUBA version, to keep the controller smaller and free of repetitive code.

Gist link: https://gist.github.com/pfurini/daf22c2cfdd146c7b9b8178c5ccf1263

Thanks,
Paolo

Hi Paolo,

Thank you for the contribution. We’ll consider including it to the platform in one of the next releases.

Thanks for feedback Konstantin.

Meanwhile, I updated the gist adding support for not auto commit screens (reloading on item change occurs only if the entity is not new/modified), and adding an

AfterInitEditComponents

handler to handle custom UI modifications after the edit state changes.

Bye
Paolo

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-9331