• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between bean and backing bean?

 
ryo gin
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi to all,

I am a beginner of JSF.

Can anayone help me explane the difference between bean and backing bean.

If its ok for you, please give me a sample code so that I can identify the difference.

Thanks in advance,
*kato_ryo*
 
Jason Porter
Author
Ranch Hand
Posts: 126
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Little bit hard just off of that, but my guess would be a bean would be a Java Bean aka POJO. A Backing Bean would be a JSF managed bean (specified via annotations in JSF 2.0 or in faces-config.xml)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18154
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A backing bean is a bean that backs JSF Views. In other words, any bean that's directly referenced on a JSF view definition.

In order to make sure that the backing bean is actually going to exist when the view is realized, it has to be a managed bean, so that the system will know what kind of bean to construct and what symbol name to reference it by.

For the most part, managed beans and backing beans are one and the same. But they're all POJO's at heart, just constructed by the JSF framework instead of some other mechanism.
 
Ed Burns
author
Ranch Hand
Posts: 82
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the blog entry for you, by my co-author Neil Griffin

http://blog.icefaces.org/blojsom/blog/default/2009/04/23/Making-distinctions-between-different-kinds-of-JSF-managed-beans/

Ed
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic