Sent: Friday, March 20, 2015 3:28 PM

Why does the UI ControlCall setModel and pass in the correct JSON data, but the control still does not display anything at Runtime?

Example: We have a table control with items bound as follows:

The binding information of a table cell is as follows:

Bind the following data to table through setModel, ProductId in JSON data value is HT-1020:

SetModel execution process:

  1. Handles the outermost items binding, whose path is the /LineItems specified in the XML View

  1. SPath indicates that this binding is the outermost binding of the table, and oList is the two rows of the table in json data:

  1. Select * from table row; select * from table row;

It can be seen from here that the data binding process of setModel is also a process of writing the actual content of the corresponding field of JSON data in Model into the instance of the abstract class bindingInfo. SetModel can be completely regarded as an assignment process:

How do I determine if setModel is successfully executed

After executing setModel, check the oModels field that called setModel’s control instance, Select * from setModel; select * from setModel; select * from setModel; select * from setModel;

If the aBindings length is greater than 0 and the item binding path information and the actual value can be seen from each item, then setModel is successfully executed.