Hi, I have this code where essentially it will reload the page with the same entity, but after it’s saved in the db
public class SelfBillingTransactionDetailView extends StandardDetailView<TrxHead> {
//
//
public void onSaveBtnClick(final ClickEvent<JmixButton> event) {
TrxHead trx = datamanager.save(getEditedEntity());
viewNavigators.detailView(TrxHead.class)
.editEntity(trx)
.withViewClass(SelfBillingTransactionDetailView.class)
.navigate();
}
}
I understand that when navigating to other page, it will consider as closing the page, so a save confirmation dialog will show. i want it to not show in this particular instance.
I also tried using closeWIthSave() method with then(), but it goes back to the list view page before navigating into the edit page
closeWithSave()
.then(() ->
{
TrxHead trx = datamanager.save(getEditedEntity());
viewNavigators.detailView(TrxHead.class)
.editEntity(trx)
.withViewClass(SelfBillingTransactionDetailView.class)
.navigate();
});
Is there any way to override the default method and disable the save confirmation dialog? Thank you in advance.
Regards.