title: Wicket wants to serialize my Panel
body: <p>When I access a specific page of my Wicket application, I get a NotSerializableException:</p>
  
  <pre><code>java.io.NotSerializableException: my.package.MyPanel$1
  </code></pre>
  
  <p>But I can't explain why wicket should try to serialize the <strong>Panel</strong>. Any idea?</p>
  
  <p>I don't know if it helps, but here is the code I use to add the panel:</p>
  
  <pre><code>final User profileUser = ...;
  final IModel&lt;User&gt; loggedInUser = ...;
  add(new MyPanel("panelid", new Model&lt;MyObject&gt;(new MyObject()))
      {
          @Override
          public boolean isVisible()
          {
              return profileUser != null &amp;&amp; profileUser.equals(loggedInUser.getObject());
          }
      });
  </code></pre>