This content has been marked as final.
Show 3 replies
-
1. Re: Understanding @In and contexts (page and session)
amitev May 30, 2009 9:27 AM (in response to gzoller.greg.zoller.aviall.com)What's the @Name of CartVO component?
-
2. Re: Understanding @In and contexts (page and session)
gzoller.greg.zoller.aviall.com May 30, 2009 4:47 PM (in response to gzoller.greg.zoller.aviall.com)Ah... that was it!
I had no @Name. The CartVO object was @Out-jected in a session-scoped object. I added a @Name to CartVO and then my @In worked as it should.
Thanks for the help!
Greg -
3. Re: Understanding @In and contexts (page and session)
gzoller.greg.zoller.aviall.com May 30, 2009 7:45 PM (in response to gzoller.greg.zoller.aviall.com)D'oh! I lied. That wasn't the solution... still seeing the problem.
Here's the code that creates the outjected CartVO:
@Name("cartMgr") @Scope(ScopeType.SESSION) public class CartMgr { @Out private CartVO cart; private int count = 500; public CartMgr() { this.cart = new CartVO(); this.cart.setOrder(new OrderBO(count)); } public int getCount() { return count; } }
This appears to work. If I go to the debug page I do see a cart object in the session context as I expect. Just don't know why my other class is having trouble injecting it.
Greg