On 6/1/06, Dennis Byrne <[EMAIL PROTECTED]> wrote:
The spec says higher scoped managed beans cannot be injected into lower scoped managed beans.  This doesn't mean we can't inject session scoped data into request scope managed beans ...

<managed-bean>
<managed-bean-name>geographyProducer</managed-bean-name>
<managed-bean-class>gov.blm.ak.GeographyConsumerThread</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
  <managed-property>
    <property-name>sharedData</property-name>
    <value>#{facesContext.externalContext.sessionMap['sharedData']}</value>
  </managed-property>
</managed-bean>

I had to read your double negative three times before I think I got it :-)

Yes, you can do this ... but you are working too hard with that kind of an _expression_.  Try this instead:

    <value>#{sharedData}</value>

As long as you don't also have a "sharedData" bean in request scope, this will pick up the session scoped bean for you (and also create it if necessary, if it is a managed bean).

Dennis Byrne

Craig

Reply via email to