This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I want to get the managed bean name in the PhaseListener implementation class.For example if i am using a button component to invoke the managed bean, i need to get the name of that bean in any of the phases.I have 10 managed bean classes in my project.
Please ,can anyone help me out in resolving this requirement.
@ Tim I think khaja was not able to express his requirement in a clear way..I hope this may be his need. Infact i have the same doubt..Let me put that
A user is Logged in and performed some actions..(Filled some form data,submitted it,viewed some links on the page and done some more actions..) and logged out..
In his particular session, some managed beans will be created and
can we get which beans are created(first time) and how many times that beans are hitted (to invoke a method or any other setting/getting values etc..) in his particular session..Is there any way of recording this in any PhaseListener or some Other thing.
Actually, this sounds like one of those common situations where someone has decided on a specific low-level solution to a high-level problem. Very frequently in cases like this, if we know what the high-level problem (business case) is, we can suggest a simpler, cleaner solution.
JSF is especially prone to this syndrome because the typical programmer mindset when given a complex framework is supplied is to attempt to maximize the use of the framework-specific functions. However, JSF was designed with the goal in mind that as much functionality as possible should be using POJO techniques. That is why my cardinal rule in JSF is to always think twice before utilising anything from a javax.faces package that isn't one of the model classes. Most of the JSF functions are intended to work from the outside in (Inversion of Control) instead of the inside out.