Dynamic View Services > Specifying Dynamic View Types > Basic Specification > Editing the Server Objects
 
Editing the Server Objects
Once the view is created, it subscribes to all the server objects and relations reached by
the propagation paths. As a consequence, subsequent modifications of these objects and relations are automatically interpreted by the dynamic view interpreter and translated, if necessary, into an update request sent to the components.
Let us examine what happens when a company object is edited while a CompanyTree view is opened on it.
Example 1: Editing the Company Identifier
If the company identifier is changed, a request is automatically sent to the components
to modify the attribute label of the root representation. At component level, the representation model interpreter executes the function setLabel on the associated TreeR representation object.
Example 2: Removing a Department
If a company department is removed, the view interpreter interprets the directives (representations and propagation) specified for the class Department in the dynamic view type in reverse order. The removal is notified first to the employees relation. For each employee, the destruction of the associated subItem representation, then that of the item representation of the department itself, are requested.
At component level, this implies the destruction of the associated TreeItemR
objects. Each destruction is performed via a call to the virtual function IlsRepresentation::deleteRpObject on the representation, with the TreeItemR object as a parameter. You can override this function in order to implement a behavior other than the simple destruction of the object.
Note:  The feedback on the representation is the same as if the department had been first cut and then added to another company, instead of being deleted.
Example 3: Deleting the Company
Following the same principle, the deletion of the company itself implies the destruction of all the representation objects associated with the Employees, Department, and Company objects to which the view has subscribed.
Example 4: Adding a Department
Because the view subscribed to the company relation departments, adding a new department automatically triggers the creation of a new item representation object on the component side. Moreover, a new subItem representation object is also created for each employee of the new department.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.