Search in sources :

Example 1 with UserSubstitutionEntity

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);
    });
}
Also used : UserSubstitutionEntity(io.jmix.securitydata.entity.UserSubstitutionEntity)

Aggregations

UserSubstitutionEntity (io.jmix.securitydata.entity.UserSubstitutionEntity)1