O'Reilly logo

JavaServer Faces by Hans Bergsten

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

<referenced-bean>

Synopsis

The <referenced-bean> element declares a bean that the application makes available in one of the scopes accessible to JSF. A development tool can use this information, e.g., include the bean name in a list of available JSF EL variables, and show all its accessible properties.

Syntax

<referenced-bean>
  [<description [xml:lang="lang"]>description</description>]*
  [<display-name [xml:lang="lang"]>displayName</display-name>]*
  [<icon [xml:lang="lang"]>
     [<small-icon>iconPath</small-icon>]
     [<large-icon>iconPath</large-icon>]
   </icon>]*
  <referenced-bean-name>beanName</referenced-bean-name>
  <referenced-bean-class>className</referenced-bean-class>
</referenced-bean>

The bean name (i.e., the name of the request, session, or application scope attribute where the application puts the reference) is declared by the <referenced-bean-name> element, and <referenced-bean-class> declares the fully qualified class name:

<referenced-bean>
  <referenced-bean-name>myDataSource</referenced-bean-name>
  <referenced-bean-class>javax.sql.DataSource</referenced-bean-class>
</referenced-bean>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required