title: How do I populate Wicket @SpringBeans in Scala?
body: <p>I have a Wicket <code>Page</code> with a <code>@SpringBean</code></p>
  
  <pre><code>class ScreenDetailsPage(parameters: PageParameters) extends BasePage(parameters) {
      @SpringBean(name = "screenDAO") protected var screenDao: DAO[Screen] = null
      assertNotNull(screenDao)
  </code></pre>
  
  <p>and I find that the @SpringBean is not populated. It makes no difference if <code>screenDao</code> is val or var, protected or private.</p>
  
  <p>Looking up the tree I find that the constructor of <code>Component</code> (indirectly) initialises <code>@SpringBean</code>s on behalf of its subclasses, but then the assignment to null is uninitializing it. But the assignment is required by Scala.</p>
  
  <p>How can I prevent this behaviour?</p>