I need to call a method in backing bean while the page loads. I achieved it using
<f:event listener="#{managedBean.onLoad}" type="preRenderView">
But whenever an ajax request is made in the page, that method get invoked again. I don't need it in my requirement. How to avoid that method call in ajax request?