I'm curious about how to get JSF to only load certain business logic on page load and not run this code when I click a button (ActionEvent
) or execute an AjaxBehaviorEvent
.
My bean is in @RequestScoped
, using JSF 2.1 and Primefaces.
Because the ActionEvent
and AjaxBehaviorEvent
are called afterwards I don't know how to tell the Bean in @PostConstruct
that it is called because of the events.
Is it because of the bean placed in wrong scope?