show paper list

This commit is contained in:
Anton Romanov 2019-11-21 10:54:48 +04:00
parent 04f545db1c
commit 9665653234

View File

@ -0,0 +1,28 @@
package ru.ulstu.paper.controller;
import ru.ulstu.paper.model.Paper;
import ru.ulstu.paper.service.PaperService;
import javax.annotation.PostConstruct;
import javax.faces.view.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.List;
@Named
@ViewScoped
public class PaperView {
@Inject
private PaperService paperService;
private List<Paper> papers;
@PostConstruct
public void init() {
papers = paperService.findAll();
}
public List<Paper> getPapers() {
return papers;
}
}