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