I have this code for a backing bean:
@PostConstruct
public void refreshData()
{
rows = (int) dd.getRows();
pages = dd.getPages();
getRender();
}
/
The JSF 1.2 spec says specifically (Page 11, Item 119 preface):
Methods on managed beans declared to be in request, session, or application scope, annotated with @PostConstruct, must be called by the JSF implementation after resource injection is performed (if any) but before the bean is placed into scope.
(More details in the spec.)
I have no idea what you mean with "before all the getter methods". At least the @PostConstruct
is called immediately after the construction of the bean and the setting of all managed properties (the bean properties which are definied in faces-config.xml
).
Thus roughly:
Your problem is likely that the value is been overriden by something else. Just run the debugger or have your code reviewed by an expert.