This content has been marked as final.
Show 3 replies
-
1. Re: named bean doesn't get injectected into the Conversation scope
swd847 Jan 16, 2009 4:04 AM (in response to newbie)componentForName does something else altogether (it returns an instance of the Component class which contains metadata about the seam component). Component.getInstance(
navigation
) is what you are after.Contexts.getConversationContext().get(
navigation
) is not working for 1 of the following two reasons:1- the bean has not been created yet and so it not in the conversation context.
2- the bean has been created but has a different scope so lives in a different conversation (does the bean have @Scope(ScopeType.CONVERSATION)? -
2. Re: named bean doesn't get injectected into the Conversation scope
newbie Jan 16, 2009 6:52 PM (in response to newbie)Thanks!
I've tried Component.getInstance("navigation") and it resolves to null, but you're correct, that's the method I wanted. Yep, I have the bean annotated with @Scope(ScopeType.CONVERSATION)
No beans appear to be managed. the first xhtml in the application tries to render widgets with bean references such as "#{webRegistry.menuItems}", "#{!navigation.passwordChangeRequired}", "#{search.searchTableName}" etc. All the beans were managed with jsf and were working just fine. Now with Seam they all resolve to null. Any ideas? -
3. Re: named bean doesn't get injectected into the Conversation scope
newbie Jan 16, 2009 6:54 PM (in response to newbie)I find it odd that if I call Seam.getComponentName(NavigationBean), the String,
navigation
is returned, but that all beans resolve to null.