File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

difference between bean and backing bean?

ryo gin

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,
Jason Porter
Ranch Hand

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

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.

An IDE is no substitute for an Intelligent Developer.
Ed Burns
Ranch Hand

Joined: Sep 11, 2006
Posts: 82
This is the blog entry for you, by my co-author Neil Griffin

I agree. Here's the link:
subject: difference between bean and backing bean?
jQuery in Action, 3rd edition