Previous Section  < Day Day Up >  Next Section

<referenced-bean>

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>
    Previous Section  < Day Day Up >  Next Section