Solved issue of model and template defined as function
Solved issue in list itemview also