Read the tutorial at http://codeontime.com/learn/getting-started/creating-three-level-master-detail-page.