• Post Reply Bookmark Topic Watch Topic
  • New Topic

Managed-bean vs. Reference-bean  RSS feed

 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The IDE I am using has a field that references a referenced-bean when setting up faces-config. As far as I know, none of the books that I have read said anything about a referenced-bean, what exactly is it?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From JSF In Action:


Applications may use scoped variables, which are set in code instead of by the
Managed Bean Creation facility. Such variables can be declared with the <referenced-bean> element so that tools know when they�re available.
 
Kerry Wilson
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So it is basically the same thing as a managed-bean except you cannot set the properties in the xml file? What else does the manage bean factory perform?
 
Sergey Smirnov
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a quote from the JSF 1.1 Specification:

The "referenced-bean" element represents at design time the promise that a Java object of the specified type will exist at runtime in some scope, under the specified key. This can be used by design time tools to construct user interface dialogs based on the properties of the specified class. The presence or absence of a referenced bean element has no impact on the JavaServer Faces runtime environment inside a web application.

[ February 04, 2005: Message edited by: Sergey Smirnov ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!