user2924127
user2924127

Reputation: 6240

Oracle ADF - Access bean from another bean

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

Answers (1)

vssk
vssk

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

Related Questions