jmix-docs
jmix-docs copied to clipboard
Document required MessageBundle adjustments in extended view
When extending/overriding a view and the MessageBundle
is used in this parent view controller, it's required that the messageGroup
of the new child view be set to the same value as that of the parent view. Otherwise, messages will be loaded with the messageGroup
from a new view, and cannot be found. For example:
@Route(value = "pslock/pessimistic-locks", layout = MainView.class)
@ViewController("pslock_LockInfo.list")
@ViewDescriptor("ts-pessimistic-lock-list-view.xml")
public class TsPessimisticLockListView extends PessimisticLockListView {
@Override
public void onInit(InitEvent event) {
messageBundle.setMessageGroup("io.jmix.pessimisticlockflowui.view.pessimisticlock");
super.onInit(event);
}
}