I am using JSF+Spring project my spring maanged bean is ViewScoped
my saving state is client.
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
Following is my bean i found that constructor of bean and postconstruct method got call only on tomcat startup when it is spring managed bean instead if it is JSF managed bean constructor and postconstruct got call on every page refresh. Is it the real behavior if i want to call method on page refresh every time under spring managed bean what should id do ?
@Component
@ViewScoped
public class DataTableBean implements Serializable{
public DataTableBean() {
super();
}
@PostConstruct
private void loadDataData(){
System.out.println("Post constructing");
}
}