public String removerProfessor() { obj.getProfessoresRemocao().add(turmaProfessor); obj.getProfessores().remove(turmaProfessor); turmaProfessor = new TurmaProfessor(); turmaProfessor.setDisciplinas(new ArrayList<DisciplinaTurmaProfessor>()); turmaProfessor.setProfessor(new Professor()); turmaProfessor.setTurma(new Turma()); turmaProfessor.setDisciplinasRemoacao(new ArrayList<DisciplinaTurmaProfessor>()); disciplinasSelecionadas = null; return getPaginaCadastro(); }
public String iniciarCadastro() { try { resetObj(); turmaProfessor = new TurmaProfessor(); turmaProfessor.setProfessor(new Professor()); turmaProfessor.setTurma(new Turma()); turmaProfessor.setDisciplinas(new ArrayList<DisciplinaTurmaProfessor>()); disciplinasSelecionadas = null; disciplinas = new DisciplinaDataModel(); disciplinas.setWrappedData(service.getAll(Disciplina.class)); alteracaoAssociacaoProfessor = false; } catch (NegocioException e) { addMensagemErro(processaException(e)); } setConfirmButton("Cadastrar"); return getPaginaCadastro(); }