Github user tatjana19 commented on the pull request:
https://github.com/apache/wicket/pull/134#issuecomment-134102919
Another option would be to create a new inteface like this:
----------------------------------------------------
package org.apache.wicket;
import org.apache.wicket.model.IModel;
/**
* An interface for all {@link Component components} with type-safe
accessors and mutators
* for the model and its object.
*
* @param <T>
* the type of the model object
*/
public interface IGenericModel<T>
{
/**
* Typesafe getter for the model
*
* @return the model
*/
IModel<T> getModel();
/**
* Typesafe setter for the model
*
* @param model
* the new model
* @return This for chaining
*/
Component setModel(IModel<T> model);
/**
* Typesafe setter for the model object
*
* @param object
* the new model object
* @return This for chaining
*/
Component setModelObject(T object);
/**
* Typesafe getter for the model's object
*
* @return the model object
*/
T getModelObject();
}
----------------------------------------------------
The IGenericComponent is for use for generic Model so the new name
IGenericModel would fit better i think
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---