Hi,
I'm just starting out using JSF and I'm a bit confused. I'm writing a web app that has very complex user roles and everything you do within the app needs to be determined by your user role. As a result all of my commandButtons and commandLinks point to methods of my managed user bean which determines whether the user can perform a given action.
So far so good. Now I want my user to fill in a form that's backed by a different bean (in this case to add a new user). Only problem is I can't see how to get access to the different bean (let's call it the account bean) from within the user bean. I've looked at getting an instance of the FacesContext and played with the lifecycle stuff but I'm still stumped.
So here's my two questions - am I thinking about this the right way? And, how do I access my account bean within my user bean?
Thanks so much,
Mike
I'm just starting out using JSF and I'm a bit confused. I'm writing a web app that has very complex user roles and everything you do within the app needs to be determined by your user role. As a result all of my commandButtons and commandLinks point to methods of my managed user bean which determines whether the user can perform a given action.
So far so good. Now I want my user to fill in a form that's backed by a different bean (in this case to add a new user). Only problem is I can't see how to get access to the different bean (let's call it the account bean) from within the user bean. I've looked at getting an instance of the FacesContext and played with the lifecycle stuff but I'm still stumped.
So here's my two questions - am I thinking about this the right way? And, how do I access my account bean within my user bean?
Thanks so much,
Mike