When my application uses the default "Typical" controller, at the end of detail forms I have only the "Save" button and that's exactly how I like it.
However I need to define a custom controller so that my application does not show a new empty record after "Save" was clicked, but keeps the saved record on screen for further editing.
It mostly works, but now the detail view shows two buttons at their bottom (see the attached image), and I want only one (only the "Save" button like before).
When my application uses the default "Typical" controller, at the end of detail forms I have only the "Save" button and that's exactly how I like it.
However I need to define a custom controller so that my application does not show a new empty record after "Save" was clicked, but keeps the saved record on screen for further editing.
I then added this in controllers.xml
and changed this in application.xml
It mostly works, but now the detail view shows two buttons at their bottom (see the attached image), and I want only one (only the "Save" button like before).
How do I achieve that?
Hi Lucio:
You have to add by-default="if-possible" to your action, thus:
BTW, OpenXava already includes a controller like yours, it is called TypicalNotResetOnSave, so you could solve your case just with this:
Help others in this forum as I help you.
Last edit: Javier Paniza 2021-04-27