Differences between revisions 2 and 3
Revision 2 as of 2006-07-31 10:11:06
Size: 1417
Editor: ReneZanner
Comment:
Revision 3 as of 2009-09-20 21:52:48
Size: 1419
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
Additional information may be found on the [http://shale.apache.org/features-spring-integration.html Shale homepage]. Additional information may be found on the [[http://shale.apache.org/features-spring-integration.html|Shale homepage]].

(original version in the Struts Wiki from 2005-04-05 by CraigMcClanahan)

Since version 1.1.5 of Spring, that framework has included a convenient integration with JSF that may be leveraged in a Shale based application. The integration includes a custom JSF VariableResolver implementation that is invoked first whenever a value binding or method binding expression is evaluated. In other words, the JSF managed beans facility behaves like this:

* If there is a registered managed bean for the specified name, use the standard JSF facilities to create it (as usual).

* If there is a configuration for this bean in the Spring WebApplicationContext, use Spring's bean creation facilities to create it.

* If neither of the above facilities recognizes the name, return null.

This technique allows you to transparently use JSF value binding expressions (either in components, or through programmatic manipulation) that access beans managed by Spring instead of by the JSF managed beans facility.

In order to use this facility, simply include the following JAR files in your /WEB-INF/lib directory:

* From Shale, shale-spring.jar (in addition to shale.jar).

* From Spring, spring-core.jar, spring-context.jar, and spring-web.jar.

Additional information may be found on the Shale homepage.

ShaleAndSpring (last edited 2009-09-20 21:52:48 by localhost)