Dynamic View Services > Specifying Dynamic View Types > Basic Specification > Opening the View
 
Opening the View
When a view CompanyTree is opened on a given company on the server side, the next notification cycle executed within the server triggers the creation of the representation of this view on the component side. Notification of a dynamic view is executed by the view interpreter. In fact, the dynamic view type specification is not interpreted each time a view is created or needs to be re-notified. When a dynamic view type is loaded by the server, an abstract structure is built. In this structure, the paths to server object attributes, relations and functions are replaced by pointers to the C++ accessors. Thus, the overhead due to view interpretation is minimal.
Let us see how the notification of the new CompanyTree is performed by the view interpreter.
1. First, the view interpreter requests the creation of a root representation object of type TreeR. By root representation object, we mean a representation object whose dynamic model is associated with the specification of the root representation that corresponds to the Company class (see the IlsRpObjModel class in Rogue Wave Server Reference Manual for more information on dynamic representation object model). The root representation object is assigned a label attribute with the value of the company identifier.
2. Notification is then propagated within the server through the relation departments.
The creation of an item representation object of type TreeItemR is requested for each department that is the target of this relation. These representation objects are assigned two attributes:
A reference called ownerTree. Its value is given by the expression company->root. The value of this expression is a pointer to the root representation object associated with the target of the relation company.
The second attribute, named label, is assigned to the department name.
3. After the creation of the representation of a department is requested, notification is propagated within the server through the relation employees of this department, requesting the creation of a subItem representation object of type TreeItemR, associated with each target of the relation.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.