Skip to Content
author's profile photo Former Member
Former Member

Context copy


I am interested whether there is possibility to copy part of the view context at once. For example if I have the following structure:

+ node1

- attribute1

- attribute2

+ subnode11

- attribute11

- attribute12

+ subnode12

- attribute121

I would like to copy the information contained in subnode11 and the attributes and nodes below it and do some work with this part of the context but I don't want to change the original.

Is this possible?



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2003 at 05:12 PM

    Hello Methodi,

    Yes, this works. Just do a right mouse click on subnode11, choose "Copy" from the context menu. Then position the cursor on the node you want to add a copy of subnode11 as child node, do a right mouse-click and choose paste from the context menu.

    Best regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Jake

      Thank you for explaining your abstract situation, but your business requirements are still not clear.

      It also appears that there is a slight misunderstanding about the nature of the context at runtime. Please allow me to explain. There are various fundamental concepts that must first be understood in order to use the context correctly:

      The following explanation is made in reference to the diagram that can be found in this document

      The structure of the context defined at design time should be thought of as a "flat" hierarchy - that is, a two dimensional hierarchy possessing no depth.

      However, at runtime, the flat context hierarchy seen at design time will now take on a third dimension of depth

      Principles concerning the context

      1) All nodes are collections.

      2) The attributes and child nodes of any given node are aggregated together into a unit known as an element. A node is a collection of such elements.

      3) The cardinality property of a node controls the maximum and minimum number of elements a node collection may contain at runtime.

      a.The first part of the cardinality value determines the number of elements the node will contain when the context is initialised.

      b.The second part of the cardinality value determines the maximum numbers of elements the node may contain.

      c.Therefore, a node with a cardinality of 0..1 starts off empty, and may contain no more than one element. A node of cardinality 1..n, starts off with one empty element, and may contain as many elements as required.

      d.Nodes that have a cardinality of 1..1 or 1..n will always have element 0 in their collection. This element is known as the default element, and is coloured yellow in the diagram.

      e.When iterating around the elements in a node collection, the currently selected element can be obtained by referencing the element at the "Lead Selection". This element is coloured red on the diagram.

      4) The singleton flag controls the relationship between a child node and its parent. The default value for the singleton flag is true.

      a.If a child node is a singleton with respect to its parent, then this means that no matter how many elements the parent node has, there will only ever be one instance of the child node.

      b.In order to access the contents of a singleton child node, the lead selection of the parent node must first point to the correct element. Then the contents of the child node will be determined automatically when any of the node's accessor methods are called.

      c.If a child node is a non-singleton with respect to its parent, then for each element in the parent node collection, there will be a separate instance of the child node. In this situation, the contents of a child node can be directly referenced without needing to reposition the lead selection of the parent node.

      Do you have an actual business requirement? If yes, please let us know. That would help us understand what you are trying to achieve, and therefore provide you with the best solution.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.