Hi
I am migrating some existing screens to v7 that was originally built in version 6x where I have some questions related to screens:
What is the equivalent Event in screen controller in 6 and 7? for example:
ready:
preCommit:
postValidate:
initNewItem:
Thanks for your help.
shustanov
(Alexander Shustanov)
May 6, 2019, 6:53am
#2
Hi!
Equivalent for ready
is com.haulmont.cuba.gui.screen.Screen.AfterShowEvent
event.
com.haulmont.cuba.gui.screen.StandardEditor.BeforeCommitChangesEvent
.
Override com.haulmont.cuba.gui.screen.StandardEditor#validateAdditionalRules
method.
com.haulmont.cuba.gui.screen.StandardEditor.InitEntityEvent
.
You can see all available events to subscribe on with Generate
(Alt+Insert
on Windows/
⌘+N
or ^+Enter
on Mac) -> Subscribe to Event
action in code editor.
1 Like
Thank you Alexander. For the # 3 above, can you please share a code snippet or link where I can get more details?
shustanov
(Alexander Shustanov)
May 6, 2019, 9:35am
#4
Was
@Override
protected void postValidate(ValidationErrors errors) {
errors.add("Some error");
}
Became
@Override
public void validateAdditionalRules(ValidationErrors errors) {
errors.add("Some error");
}