use of easytests.personal.dto.SubjectDto in project easy-tests by malinink.
the class SubjectsController method read.
@GetMapping("{id}")
public String read(@PathVariable("id") Integer id, Model model) {
final SubjectsOptionsInterface subjectsOptions = new SubjectsOptions().withIssueStandard(new IssueStandardsOptions());
final SubjectModelInterface subjectModel = getSubjectModel(id, subjectsOptions);
final SubjectDto subject = new SubjectDto();
subject.map(subjectModel);
model.addAttribute("subject", subject);
model.addAttribute("issueStandardId", subjectModel.getIssueStandard().getId());
return "subjects/view";
}
use of easytests.personal.dto.SubjectDto in project easy-tests by malinink.
the class SubjectsController method update.
@GetMapping("update/{id}")
public String update(@PathVariable("id") Integer id, Model model) {
model.addAttribute("methodType", "update");
final SubjectModelInterface subjectModel = getSubjectModel(id);
final SubjectDto subject = new SubjectDto();
subject.map(subjectModel);
model.addAttribute("subject", subject);
return "subjects/form";
}
use of easytests.personal.dto.SubjectDto in project easy-tests by malinink.
the class SubjectsController method deleteConfirmation.
@GetMapping("delete/{id}")
public String deleteConfirmation(@PathVariable("id") Integer id, Model model) {
final SubjectDto subjectDto = new SubjectDto();
final SubjectModelInterface subjectModel = getSubjectModel(id);
subjectDto.map(subjectModel);
model.addAttribute("subject", subjectDto);
return "subjects/delete";
}
use of easytests.personal.dto.SubjectDto in project easy-tests by malinink.
the class SubjectsController method create.
@GetMapping("create")
public String create(Model model) {
final SubjectDto subject = new SubjectDto();
subject.setName("");
subject.setDescription("");
model.addAttribute("methodType", "create");
model.addAttribute("subject", subject);
return "subjects/form";
}
Aggregations