AnsweredAssumed Answered

how to expose custom spring beans to the jsf context

Question asked by mike.kukla on Mar 19, 2010
Latest reply on Mar 24, 2010 by mike.kukla
Throughout the Alfresco faces-config.*.xml files, one finds expressions like
this:  <value>#{NodeService}</value> or  <value>#{SearchService}</value>.

In other words, beans configured in and managed by Spring are somehow made
accessible to the JSF configuration/context.

For example, in faces-config-beans.xml:

<managed-bean>
   <managed-bean-name>MultilingualManageDialog</managed-bean-name>
   <managed-property>
      <property-name>nodeService</property-name>
   <value>#{NodeService}</value>
   </managed-property>
   …
</managed-bean>

Can any one explain how one would do the same thing for a **custom** spring bean:
i.e., configure a custom bean in spring and then "expose" it to the JSF context,
something like this:

In some custom-bean-context.xml
<bean id="MyCustomSpringBean" class="…"/>

In faces-config-custom.xml

  <managed-bean>
      <managed-bean-name>MyCustomManagedBean</managed-bean-name>
       <managed-property>
         <property-name>mySpringBean</property-name>
         <value>#{MyCustomSpringBean}</value>
      </managed-property>
      …
   </managed-bean>
  
My apologies if the solution to this is obvious, or if this question has already been posed and answered.
I'm new to Alfresco and still learning.

Mike Kukla
Buffalo, NY

Outcomes