James Flynn wrote:
Hi Simon,
Thanks so much for your help! I tried your solution outlined below, but got an
exception:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No
bean named '#{dataBean}' is defined:
org.springframework.beans.factory.support.DefaultListableBeanFactory defining
beans
We are using the spring/jsf integration, so it seems to me that Spring is
"injecting" itself into this managed bean facility. So it seems we must
register our DataBean with Spring for this to work. But I'm guessing we need to
continue to register it in faces-config as well, as the DataBean is a "backing
bean" in the JSF side of things. Does this sound right to you?
Well, there is really no such thing as a "backing bean" in JSF. There
are just beans that are stored into the standard servlet
request/session/application scope hashmaps. EL expressions can then
refer to them.
The managed bean stuff is really very simple. Whenever the EL expression
resolved is asked to evaluate an expression like "#{objname}" it looks
in the request/session/application. If no such object is found then it
asks the managed bean manager to create the object. And whenever the
managed bean manager finds a <managed-property> tag while trying to
create an object, it passes it to the EL resolver to compute the value
before calling the appropriate setter. [any circular references cause an
error to be reported].
So I'm not sure why the spring stuff is involved here at all.
Unfortunately I'm using JSF on J2EE, not on Spring so I can't shed any
more light on your spring-related problem.
Regards,
Simon