Wicket may serialize Form and Page objects. When deserializing them 
dependencies which aren't serializable will end up null.

Am 5. August 2015 14:27:31 MESZ, schrieb Stepan Samarin 
<[email protected]>:
>Hello,
>
>There's a problem with injection when onSubmit of the Form is invoked. 
>Scenario is the following:
>Wicket (6.20) page or panel with the field "manager" with @Inject 
>annotation.
>
>Form is created as an anonymous class in onInitialize method of the
>page. 
>onSubmit method of the form then refers to manager field of the parent
>page.
>Occasionally access to "manager" failed with NPE.
>
>So far the solution was to use: Injector.injectMembers(manager); in 
>onSubmit method.
>
>But there's probably something I'm missing.
>
>Would appreciate help/advice.
>
>Thanks, Stepan.
>
>-- 
>You received this message because you are subscribed to the Google
>Groups "google-guice" group.
>To unsubscribe from this group and stop receiving emails from it, send
>an email to [email protected].
>To post to this group, send email to [email protected].
>Visit this group at http://groups.google.com/group/google-guice.
>To view this discussion on the web visit
>https://groups.google.com/d/msgid/google-guice/d66812b7-4be3-42dd-9737-4e4c65172cc3%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/0D1B4D34-04A6-43AC-94CE-F441D94F452D%40gmx.ch.
For more options, visit https://groups.google.com/d/optout.

Reply via email to