Showing
3 changed files
with
13 additions
and
8 deletions
... | @@ -33,12 +33,16 @@ public class ListPublisherVersionsView implements Serializable { | ... | @@ -33,12 +33,16 @@ public class ListPublisherVersionsView implements Serializable { |
33 | this.publisherService = publisherService; | 33 | this.publisherService = publisherService; |
34 | } | 34 | } |
35 | 35 | ||
36 | + //no args constructor to make it proxyable | ||
37 | + ListPublisherVersionsView() { | ||
38 | + } | ||
39 | + | ||
36 | 40 | ||
37 | // View Action being executed at view loading | 41 | // View Action being executed at view loading |
38 | public void setView() { | 42 | public void setView() { |
39 | logger.trace("setView : publisherId = {}", publisherId); | 43 | logger.trace("setView : publisherId = {}", publisherId); |
40 | publisherVersions = publisherService.getAllPublisherVersions(); | 44 | publisherVersions = publisherService.getAllPublisherVersions(); |
41 | - viewAll = ( publisherId == null ) ; | 45 | + viewAll = (publisherId == null); |
42 | if (!viewAll) { | 46 | if (!viewAll) { |
43 | logger.trace("setView : !viewAll"); | 47 | logger.trace("setView : !viewAll"); |
44 | filterOnID(); | 48 | filterOnID(); |
... | @@ -60,10 +64,7 @@ public class ListPublisherVersionsView implements Serializable { | ... | @@ -60,10 +64,7 @@ public class ListPublisherVersionsView implements Serializable { |
60 | publisherVersions = publisherService.getAllPublisherVersions(); | 64 | publisherVersions = publisherService.getAllPublisherVersions(); |
61 | filterOnID(); | 65 | filterOnID(); |
62 | } | 66 | } |
63 | - | 67 | +// |
64 | - /** no args constructor to make it proxyable */ | ||
65 | - protected ListPublisherVersionsView() { | ||
66 | - } | ||
67 | 68 | ||
68 | public PublisherService getPublisherService() { | 69 | public PublisherService getPublisherService() { |
69 | return publisherService; | 70 | return publisherService; | ... | ... |
... | @@ -44,13 +44,16 @@ public class UpdateUserBean { | ... | @@ -44,13 +44,16 @@ public class UpdateUserBean { |
44 | private boolean visible; | 44 | private boolean visible; |
45 | private boolean activated; | 45 | private boolean activated; |
46 | 46 | ||
47 | - | ||
48 | @Inject | 47 | @Inject |
49 | public UpdateUserBean(UserService userService, SharedService sharedService) { | 48 | public UpdateUserBean(UserService userService, SharedService sharedService) { |
50 | this.userService = userService; | 49 | this.userService = userService; |
51 | this.sharedService = sharedService; | 50 | this.sharedService = sharedService; |
52 | } | 51 | } |
53 | 52 | ||
53 | + //no args constructor to make it proxyable | ||
54 | + UpdateUserBean() { | ||
55 | + } | ||
56 | + | ||
54 | 57 | ||
55 | @PostConstruct | 58 | @PostConstruct |
56 | public void init() { | 59 | public void init() { | ... | ... |
... | @@ -38,7 +38,7 @@ public class ListPublisherVersionsViewTest { | ... | @@ -38,7 +38,7 @@ public class ListPublisherVersionsViewTest { |
38 | 38 | ||
39 | @Before | 39 | @Before |
40 | public void setUp() { | 40 | public void setUp() { |
41 | - listPublisherVersionsView = new ListPublisherVersionsView(); | 41 | + |
42 | 42 | ||
43 | // Données | 43 | // Données |
44 | publisherVersion = new PublisherVersion(); | 44 | publisherVersion = new PublisherVersion(); |
... | @@ -65,7 +65,8 @@ public class ListPublisherVersionsViewTest { | ... | @@ -65,7 +65,8 @@ public class ListPublisherVersionsViewTest { |
65 | 65 | ||
66 | // Mock | 66 | // Mock |
67 | when(publisherService.getAllPublisherVersions()).thenReturn(publisherVersions); | 67 | when(publisherService.getAllPublisherVersions()).thenReturn(publisherVersions); |
68 | - listPublisherVersionsView.setPublisherService(publisherService); | 68 | + listPublisherVersionsView = new ListPublisherVersionsView(publisherService); |
69 | + | ||
69 | logger.trace("listPublisherVersionsView : {}", listPublisherVersionsView); | 70 | logger.trace("listPublisherVersionsView : {}", listPublisherVersionsView); |
70 | logger.trace("listPublisherVersionsView, publisherVersions : {}", publisherVersions); | 71 | logger.trace("listPublisherVersionsView, publisherVersions : {}", publisherVersions); |
71 | } | 72 | } | ... | ... |
-
Please register or login to post a comment