Widget restore methods

Services are deployed in the Service.xml file, which contains widget definition. The widgets are all registered in the WidgetCatalog.xml file. The relationship between the two files is illustrated in the following figure:

The relationship between Service.xml and WidgetCatalog.xml

When an end user triggers the add service function in service list, the widget is imported into a row element of BTT Workplace Area. So when the saving function is triggered, it saves the service into the UserProtal.xml file.

The flow when an end user triggers the ‘add service’ function is as follows:

After step 3 in the figure, when the service model is newly created, a new row element is also created for the service container. The row id is random. The service widget relates with the row element through the rowid.

Then when saving function is triggered, the model structure is saved in the server side (Refer to Storage for more information). The service widget information is saved into the UserPortal.xml file, which is used to restore the service that an end user adds into Workplace Area. While the UserLayout.xml file is used for storing Workplace Area structure, such as Tab, Column and Row Element, the relationship is illustrated as follows: