Next, we want to display data on each of the ‘ArticleView’ instances. 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 thetext
property toself.item['title']
category_label
: Bind thetext
property toself.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 thetext
property toself.item['content']
image_1
: Bind thesource
property toself.item['image']
