Does anyone know why the BookmarkablePageLink class is generic in wicket? I have been creating new BookmarkablePageLink<Object>(...) just to avoid the compiler warnings.
Should I be choosing a different generic type? A brief view of the code just confused me further about why it was generic.
From a brief overview of the javadoc it looks like the reason for generics can be seen in the abstract superclass Link. Specifically, a Link lets you associate with it a model object of a generic type via setModelObject. So from their example, when you override onClick:
You can access a relevant model object.