This content has been marked as final.
Show 5 replies
-
1. Re: Converter can not work when upgrade from 2.0 to 2.1
cash1981 Jul 31, 2009 3:46 PM (in response to kingdom119)Injections doesnt work with bypassinterceptor. Remove it and it will. If you really want bypass you can try the
Component.instance().get("trialItems")
Injection should have worked regardless of 2.0 or 2.1
-
2. Re: Converter can not work when upgrade from 2.0 to 2.1
cash1981 Jul 31, 2009 3:48 PM (in response to kingdom119)I believe you are getting null because you have
required=false
-
3. Re: Converter can not work when upgrade from 2.0 to 2.1
kingdom119 Jul 31, 2009 4:11 PM (in response to kingdom119)
Shervin Asgari wrote on Jul 31, 2009 15:46:
Injections doesnt work with bypassinterceptor. Remove it and it will. If you really want bypass you can try theComponent.instance().get("trialItems")
Injection should have worked regardless of 2.0 or 2.11.If we do not use @BypassInterceptors, there will be errors in my converter. If I use it, injected will be null.....
2. why I use required equal false, because trialItems is outjected in other beans.PS, it seems there is no such instance() method in component class.
-
4. Re: Converter can not work when upgrade from 2.0 to 2.1
cash1981 Jul 31, 2009 4:19 PM (in response to kingdom119)Sorry its
Component.getInstance("trialItems")
If that doesnt work, you can try
Contexts.getConversationContext().get("trialItems")
If it is already in the conversation scope
-
5. Re: Converter can not work when upgrade from 2.0 to 2.1
kingdom119 Jul 31, 2009 4:24 PM (in response to kingdom119)It's solved. Thanks.
I have to use it like this instead of @In
Component.getInstantce("trialItems")