February 2019
Intermediate to advanced
450 pages
11h 59m
English
Now that we have a data model built, let's display the data that's loaded. Starting with the email detail view, we will make use of Walk's declarative API, DataBinder. This allows us to avoid having to manually set the data on each label every time a new message is loaded. To work correctly, we also need to create a walk.DataBinder to assign to—this will handle the actual bindings:
emailDetail *walk.DataBinder
Then we can update the Composite widget that displays the email information to use this data binding. Let's also set the default content through the DataSource field. This information will come from the model, which we will initialize shortly:
DataBinder: DataBinder{ AssignTo: &emailDetail, DataSource: model.Server.CurrentMessage(), ...
Read now
Unlock full access