Reputation: 6240
I have a tasflow. Inside of that taskflow are two managed beans:
From beanTwo I need to access a method in beanOne. How can I call a beanOne from beanTwo programmaticly?
Upvotes: 0
Views: 777
Reputation: 465
Yes, you can do it. But it is not a good practice.
private BeanOne getBeanOne() {
return (BeanOne)ADFContext.getCurrent().getSessionScope().get("BeanOneName");
}
private void beanOneMethodExecution() {
getBeanOne().executeSomeMethod();
}
Upvotes: 3