Salesforce

Nested Magic xpa Components (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Nested Magic xpa Components (Magic xpa 3.x)

How are nested components handled?

Using the Magic xpa component methodology described in this paper, it is not inconceivable that you will have a system of components within components, known as nested components, in your application. This section explains how to work with nested components.

What Are Nested Components?

You may have a component that is used in an application. Then you may use the application that contains the original component as another component within another application. Or, you may have a component that contains all of your frequently used models, data sources, and programs, and then you create a module using those revealed objects. Next you create a package that uses that module. In both of the cases above, you have created nested component systems. The figure below displays a more complex nested component system.

In this example, we have Component A, with frequently used models, Data Sources (tables) and programs, and Component B, with frequently used events and global handlers. These two components are used in the Bookkeeping Module C and the Stock Module D. These two modules are used as components of the Accounting Application E, which also uses components A and B. In this case the same component is used three times and, in theory, would therefore need to be loaded three times, but this is not what really happens. The Magic xpa engine is smart and knows when a component has been loaded into memory and does not need to be loaded again for each instance.

Note:

Magic xpa recognizes a component by its full name. If the component is loaded as c:\Magic xpa x.x\comp.ecf in one container or host and is loaded as \\myserver\Magic xpa x.x\comp.ecf in another container, Magic xpa will identify these as the names of two different components even though they may point to the same component. The same is true if two different databases are used.

Limitation:

You cannot reveal objects from a nested component. In other words, a host project cannot reveal objects from one of its components.

Recursive:

Recursive components generate a runtime error. This may happen when you have a Host Application A, which contains a Component B, which contains a Component A that is identical to the host application.

Reference
Attachment 
Attachment