blob: 8f1725a59d8e7aa38d1cb58f7784511d75a716ad [file] [log] [blame]
Always try to pass models on to the parent component. By that, you ensure that at the end of every request the method _IModel.detach()_ gets called. This method is responsible for a data cleanup. Another example: you have implemented your own model which persists the data in the _detach()_ method. So the call of _detach()_ is necessary for that your data gets persisted. You can see an exemplary passing to the super constructor here:
*Listing 11:*
[source,java]
----
public class RegistrationInputPanel extends Panel{
public RegistrationInputPanel(String id, IModel<Registration> regModel) {
super(id, regModel)
// add components
}
}
----