Is there any difference in loading the resources for a JSF page backed by a managed bean having a constructor and a JSF page backed by a managed bean having a PostConstruct?
In my managed bean I need to upload the list with some items from database. I have implemented using the Constructor that initializes this list object.
ManagedBean {
ManagedBean(){
connect to database;
upload list;
}
}
The other way is instead of using the constructor use the Javax.annotations.PostConstruct ->
ManagedBean {
@PostConstrcut
void int(){
connect to database;
upload list;
}
}
Thanks in advance.
Regards
Sandeep