0

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?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
user3586195
  • 498
  • 4
  • 15
  • 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 with – Kukeltje Jun 02 '15 at 20:55

1 Answers1

0

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

user3586195
  • 498
  • 4
  • 15
  • So you could check which one was not null? Would still be good to post code in the question and in an answer – Kukeltje Jun 02 '15 at 21:24