Next, we want to display data on each of our ‘ArticleView’ Forms. Once again, we’ll use Data Bindings, and the Form’s self.item property to do this.

Open the ‘ArticleView’ Form. For each of the ‘title’, ‘category’, ‘content’ and ‘image’ components, add a Data Binding to self.item:

  • title_label: Bind the text property to self.item['title']
  • category_label: Bind the text property to self.item['category']['name'] (self.item['category'] is a row from the categories table, so we want to get the ‘name’ from the row)
  • content_label: Bind the text property to self.item['content']
  • image_1: Bind the source property to self.item['image']
Adding data bindings to the ArticleView Form