|
|
@ -8,6 +8,7 @@ import javax.annotation.PostConstruct;
|
|
|
|
import javax.faces.view.ViewScoped;
|
|
|
|
import javax.faces.view.ViewScoped;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
import javax.inject.Inject;
|
|
|
|
import javax.inject.Named;
|
|
|
|
import javax.inject.Named;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
@ -19,6 +20,8 @@ public class PapersView {
|
|
|
|
|
|
|
|
|
|
|
|
private List<Paper> papers;
|
|
|
|
private List<Paper> papers;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private List<Paper> selectedPapers = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
|
|
private String newPaperTitle;
|
|
|
|
private String newPaperTitle;
|
|
|
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
|
@PostConstruct
|
|
|
@ -33,6 +36,10 @@ public class PapersView {
|
|
|
|
papers = paperService.findAll();
|
|
|
|
papers = paperService.findAll();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void deleteSelected() {
|
|
|
|
|
|
|
|
paperService.delete(selectedPapers);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<Paper.PaperStatus> getPaperStatuses() {
|
|
|
|
public List<Paper.PaperStatus> getPaperStatuses() {
|
|
|
|
return Arrays.asList(Paper.PaperStatus.values());
|
|
|
|
return Arrays.asList(Paper.PaperStatus.values());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -48,4 +55,12 @@ public class PapersView {
|
|
|
|
public void setNewPaperTitle(String newPaperTitle) {
|
|
|
|
public void setNewPaperTitle(String newPaperTitle) {
|
|
|
|
this.newPaperTitle = newPaperTitle;
|
|
|
|
this.newPaperTitle = newPaperTitle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Paper> getSelectedPapers() {
|
|
|
|
|
|
|
|
return selectedPapers;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSelectedPapers(List<Paper> selectedPapers) {
|
|
|
|
|
|
|
|
this.selectedPapers = selectedPapers;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|