use of io.jmix.securitydata.entity.UserSubstitutionEntity in project jmix by jmix-framework.
the class UserSubstitutionsFragment method onAfterInit.
@Subscribe(target = Target.PARENT_CONTROLLER)
public void onAfterInit(Screen.AfterInitEvent event) {
createAction.setScreenConfigurer(screen -> {
UserSubstitutionEntity substitution = metadata.create(UserSubstitutionEntity.class);
substitution.setUsername(user.getUsername());
((UserSubstitutionEdit) screen).setEntityToEdit(substitution);
((UserSubstitutionEdit) screen).setParentDataContext(dataContext);
});
}
Aggregations