use of com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm in project trainning by fernandotomasio.
the class PudsController method saveReferencia.
public void saveReferencia(ReferenciaForm form) {
RequestContext requestContext = RequestContextHolder.getRequestContext();
DisciplinaPUDForm disciplinaForm = requestContext.getFlowScope().get("disciplinaForm", DisciplinaPUDForm.class);
DisciplinaDTO disciplina = teachingDocumentsService.findDisciplina(disciplinaForm.getId());
ReferenciaDTO referencia = new ReferenciaDTO();
referencia.setId(form.getId());
referencia.setTexto(form.getDescricao());
referencia.setDisciplina(disciplina);
if (referencia.getId() == null) {
Long id = teachingDocumentsService.createReferencia(referencia);
form.setId(id);
List<ReferenciaForm> referenciasDataList = disciplinaForm.getReferenciasDataList();
referenciasDataList.add(form);
} else {
teachingDocumentsService.updateReferencia(referencia);
}
}
use of com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm in project trainning by fernandotomasio.
the class PudsController method addUnidade.
public void addUnidade(UnidadeForm form) {
RequestContext requestContext = RequestContextHolder.getRequestContext();
DisciplinaPUDForm disciplinaForm = requestContext.getFlowScope().get("disciplinaForm", DisciplinaPUDForm.class);
List<UnidadeForm> unidades = disciplinaForm.getUnidadesDataList();
unidades.add(form);
}
Aggregations