Jean-Francois Leveque

Injection par constructeur.

...@@ -28,9 +28,7 @@ import java.util.List; ...@@ -28,9 +28,7 @@ import java.util.List;
28 public class PublisherVersionView implements Serializable { 28 public class PublisherVersionView implements Serializable {
29 Logger logger = LoggerFactory.getLogger(getClass()); 29 Logger logger = LoggerFactory.getLogger(getClass());
30 30
31 - @Inject
32 PublisherService publisherService; 31 PublisherService publisherService;
33 - @Inject
34 SharedService sharedService; 32 SharedService sharedService;
35 33
36 private boolean editMode; 34 private boolean editMode;
...@@ -55,6 +53,16 @@ public class PublisherVersionView implements Serializable { ...@@ -55,6 +53,16 @@ public class PublisherVersionView implements Serializable {
55 53
56 private List<Country> availableCountries; 54 private List<Country> availableCountries;
57 55
56 + @Inject
57 + public PublisherVersionView(PublisherService publisherService, SharedService sharedService) {
58 + this.publisherService = publisherService;
59 + this.sharedService = sharedService;
60 + }
61 +
62 + //no args constructor to make it proxyable
63 + PublisherVersionView() {
64 + }
65 +
58 @PostConstruct 66 @PostConstruct
59 public void init() { 67 public void init() {
60 availableCountries = sharedService.getAllCountries(); 68 availableCountries = sharedService.getAllCountries();
......