multiple managed beans in jsf

Hi,

I read

'multiple managed beans to centralize event processing functions in separate managed bean from input data holded beans from event handler menthods'


I have not clearly understood it. Why we need multiple managed beans.

Please advise.

Any links resources ideas highly appreciated. Thanks in advance
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

girionisCommented:
I am not sure as well. Can you post the whole paragraph?
0
gudii9Author Commented:
something similar
http://stackoverflow.com/questions/1883451/jsf-multiple-backing-beans-on-one-page

But still i am not clearly on this concept esp backing bean and managed bean separating


centralize event processing functions in separate managed bean from input data holded beans from event handler menthods'



please advise
0
girionisCommented:
The quoted text means that you can have two different beans. One bean to hold the values and another to hold the business logic. For example lets say that you want to calculate the loan for a customer, you can have one bean with the customer data
public class Customer {
    private int age;
    private String name, surname;
    private int balance;
    private Address address;
    ...
}

Open in new window

and another bean that calculates the loan:
public class LoanCalculator {
    public void calculate(Customer customer) {
        if (customer.getBalance() > 10) {
            ...
        }
    }
}

Open in new window

The first bean only holds the values (the data) while the second bean performs actions on this data.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.