unsetSetContext > Semantics of Dynamic View Type Specifications > Propagation and Representation Order
 
Propagation and Representation Order
Notification follows the order in which propagation and subscription were declared.
*When a component is notified of a Server object creation, notification takes place in the order defined in the dynamic-view type specification.
*Conversely, when a component is notified of a Server object deletion, the order is reversed.
In the following example, when an instance of the view DomainView is opened, the following takes place:
*First, the server sends a request for the creation of the tree representation associated with the Domain origin to the component.
*Then, notification is propagated to the nodes relation, thereby requesting the item representations associated with the Node targets to be created.
Each of these item representations references the owning tree via their owner attribute.Conversely, when the view is closed (see the functions IlsMvView::onClose and IlsRepresentation:close), the notification process does the following in this order:
*First, it propagates the events to the nodes relation, thereby requesting the deletion of the item representations of the Node objects,
*Then, it requests the deletion of the tree representation of the Domain origin.
view DomainView:
subscribe origin Domain:
represent Tree tree:...
propagate nodes;
subscribe Node:
represent TreeItem item:
mandatory Ref<Tree> owner=domain->tree;
Important: It is important to take this order into account when defining references. In other words, the tree representation must be created before notification is propagated to the relation nodes, so that the tree representation of the Domain object already exists when the item representation is created.
subscribe Node:
represent TreeItem item:
mandatory Ref<Tree> owner=domain[tree];

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