use of com.tomasio.projects.trainning.form.TurmaEfetivaStep2Form in project trainning by fernandotomasio.
the class TurmasEfetivasController method initializeTurmaEfetivaStep2Form.
public TurmaEfetivaStep2Form initializeTurmaEfetivaStep2Form(Long turmaId, ExternalContext context) {
OrganizacaoDTO userOrganization = (OrganizacaoDTO) context.getSessionMap().get("userOrganization");
TurmaEfetivaStep2Form turmaEfetivaStep2Form = new TurmaEfetivaStep2Form();
if (turmaId != null && turmaId > 0) {
TurmaEfetivaDTO turma = atividadesEnsinoService.findTurmaEfetiva(turmaId);
turmaEfetivaStep2Form.setResponsavelId(turma.getResponsavelId());
turmaEfetivaStep2Form.setResponsavelApresentacaoId(turma.getResponsavelApresentacaoId());
turmaEfetivaStep2Form.setResponsavelConclusaoId(turma.getResponsavelConclusaoId());
turmaEfetivaStep2Form.setResponsavelMatriculaId(turma.getResponsavelMatriculaId());
turmaEfetivaStep2Form.setResponsavelPreMatriculaId(turma.getResponsavelPreMatriculaId());
turmaEfetivaStep2Form.setResponsavelSelecaoId(turma.getResponsavelSelecaoId());
} else {
turmaEfetivaStep2Form.setResponsavelApresentacaoId(userOrganization.getId());
turmaEfetivaStep2Form.setResponsavelConclusaoId(userOrganization.getId());
turmaEfetivaStep2Form.setResponsavelId(userOrganization.getId());
turmaEfetivaStep2Form.setResponsavelMatriculaId(userOrganization.getId());
turmaEfetivaStep2Form.setResponsavelPreMatriculaId(userOrganization.getId());
turmaEfetivaStep2Form.setResponsavelSelecaoId(userOrganization.getId());
}
return turmaEfetivaStep2Form;
}
Aggregations