show paper list
This commit is contained in:
parent
04f545db1c
commit
9665653234
28
src/main/java/ru/ulstu/paper/controller/PaperView.java
Normal file
28
src/main/java/ru/ulstu/paper/controller/PaperView.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user