I am trying to invoke a bean action on page load, bean is registered in session scope.
I have accomplish this with js like this:- document.getElementById('form1:show_data').click();
I know it can be done alternatively by calling the action in bean constructor, but in session scope the action is called only once. is there any other of doing this in JSF 1.
You can still create another bean in the request scope and in its constructor get the session bean and call whatever you need to call.
You still have to reference the request scoped bean in the view somehow just to ensure it will be created.
This will do: