0
votes

I have a requestscoped bean which can receive its data from three different viewscoped beans (from 3 different pages). The beans are JSF Managed Beans.

When I use ManagedProperty in the request scoped for 3 different view scoped beans, it instantiates the view scoped beans which is what I do NOT want. I want to simply know from which bean it is being called from and then call a specific method (different) for each bean.

How can I check which bean is instantiated and in scope so I can call the correct bean's method?

1
I need to see some code. I do not have a clear picture what you exactely do. Might be that you try to solve something that is wrong by design to begin withKukeltje

1 Answers

0
votes

Looks like it's pretty simple. I was reading one of Balus's posts. I simply used ManagedProperty(value="#{viewScope.managedBeanName}") . It did not instantiate. For the inscope, it gave me the created bean :). Happy