Can I get a link to a managed to-be-execute application in the before-invokeApplication-phaselistener package?
Before embarking on the application phase, it should be clear which managedBean this method should execute.
For example, suppose 1 main controls a bean to process 1 jsf page.
So what I need is basically:
- The user gets access to the program from the menu
- Since it is opened from the menu, the main control method bean init () is called to initialize materials such as data preparation, authorization verification
- Subsequent submissions do not require calling the init () method until it is retrieved from the menu again.
To realize point number 2, im thinking about intercepting one of the phases
I checked the API docs on how to get a managed bean in the implementation of the steps, but I didn't seem to find it.
After entering this question, I understand that I can do this in @PostConstruct or the managed bean constructor, but this will be done only the first time the bean is created, and my need to call the method every time from jsf opens the menu.
Any suggestions?
Regards,
Albert Cam
source
share