When you plug together a web framework, and Spring, you end up making choices on how to do this (unless you use Spring MVC).
Considering DRY, you really don’t want to have to:
a) Setup the model as a bean in Spring
b) Also setup the same bean (with the same name maybe for convention) in the web framework
Seeing all of this configuration can be irksome, so we thought that this would be a perfect use of namespaces which could allow us to go from:
<managed-bean>
<managed-bean-name>newWidget</managed-bean-name>
<managed-bean-class>de.mindmatters.faces.spring.SpringBeanScope</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean><bean id=”newWidget” class=”model.Widget” singleton=”false”/>
To:
<bean id=”newWidget” class=”model.Widget” singleton=”false” jsf:scope=”request”/>