JR Utily

proxyable constructors

......@@ -33,12 +33,16 @@ public class ListPublisherVersionsView implements Serializable {
this.publisherService = publisherService;
}
//no args constructor to make it proxyable
ListPublisherVersionsView() {
}
// View Action being executed at view loading
public void setView() {
logger.trace("setView : publisherId = {}", publisherId);
publisherVersions = publisherService.getAllPublisherVersions();
viewAll = ( publisherId == null ) ;
viewAll = (publisherId == null);
if (!viewAll) {
logger.trace("setView : !viewAll");
filterOnID();
......@@ -60,10 +64,7 @@ public class ListPublisherVersionsView implements Serializable {
publisherVersions = publisherService.getAllPublisherVersions();
filterOnID();
}
/** no args constructor to make it proxyable */
protected ListPublisherVersionsView() {
}
//
public PublisherService getPublisherService() {
return publisherService;
......
......@@ -44,13 +44,16 @@ public class UpdateUserBean {
private boolean visible;
private boolean activated;
@Inject
public UpdateUserBean(UserService userService, SharedService sharedService) {
this.userService = userService;
this.sharedService = sharedService;
}
//no args constructor to make it proxyable
UpdateUserBean() {
}
@PostConstruct
public void init() {
......
......@@ -38,7 +38,7 @@ public class ListPublisherVersionsViewTest {
@Before
public void setUp() {
listPublisherVersionsView = new ListPublisherVersionsView();
// Données
publisherVersion = new PublisherVersion();
......@@ -65,7 +65,8 @@ public class ListPublisherVersionsViewTest {
// Mock
when(publisherService.getAllPublisherVersions()).thenReturn(publisherVersions);
listPublisherVersionsView.setPublisherService(publisherService);
listPublisherVersionsView = new ListPublisherVersionsView(publisherService);
logger.trace("listPublisherVersionsView : {}", listPublisherVersionsView);
logger.trace("listPublisherVersionsView, publisherVersions : {}", publisherVersions);
}
......