This is not your real code. This wouldn't even compile. Even if it did, it would crash when ran. And you were supposed to use a standard model against your custom view. Without any proxy models inbetween.