Enhancement
We have a requirement that the create dialog remains open after pressing an object creation, parts of the form are reset and thus the user can create multiple objects faster one after the other.
Workaround
Override (without calling super):
protected void afterCommit(LayoutComponent component, Object newObject) { deleteFormContext(component); }
If you have post create actions, you must either code them in this method (setSelected(...) etc.), or create a variable in the constructor itself
_postCreateActions = TypedConfiguration.getInstanceList(context, config.getPostCreateActions());
and additionally in "afterCommit()":
WithPostCreateActions.processCreateActions(_postCreateActions, component, newObject);
do.
Test
- /com.top_logic.demo/src/test/java/test/com/top_logic/demo/scripted/layout/create/TestMultiCreateWithoutClosingDialog.script.xml