• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

backing bean and managed bean-difference?

 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between and managed bean and backing bean?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A managed bean is simply a JavaBean that you've specified to the JSF config file as being automatically constructed and initialized by the JSF framework.

A backing bean is a JavaBean that's bound to a JSF page, usually so it can display and/or input data.

More often than not, backing beans are managed beans, since as long as the framework's willing to set up your beans for you, you might as well let it. For one thing, the management framework will allow you to tie together complex interconnetions between beans without your having to hard-code those connections within the beans themselves. Which simplifies the beans and makes them easier to reuse and to test.
 
scot summers
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one more
backing bean should be defined in scope - request and it should not hold the state
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic