aspose file tools*
The moose likes JSF and the fly likes difference between bean and backing bean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "difference between bean and backing bean?" Watch "difference between bean and backing bean?" New topic
Author

difference between bean and backing bean?

ryo gin
Greenhorn

Joined: Jan 28, 2010
Posts: 7


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
Ranch Hand

Joined: Apr 26, 2007
Posts: 120
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

Joined: Jun 25, 2001
Posts: 16065
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ed Burns
author
Ranch Hand

Joined: Sep 11, 2006
Posts: 82
    
    5
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
 
wood burning stoves
 
subject: difference between bean and backing bean?