MicroStrategy ONE
Container Beans
Container beans are application beans that hold other beans, referred to as child beans or contained beans. Container beans provide the framework that allows their child beans to be programmatically manipulated together and their child components to be laid out on the page in a specific way. Container beans are generally not rendered directly. Web Components are built on top of them and then rendered using inline frames.
Inline frames are used by MicroStrategy Web to load the GUI components contained in container beans when those container beans are represented as <web-components>. Inline frames are not used by container beans alone; many MicroStrategy Web pages component nodes have an iframe attribute, usually set to 'true' to improve client-browser performance.
Examples of container beans include the ReportFrameBean on the Report Execution Page and the DocumentFrameBean on the HTML Document Execution Page. The ReportFrameGenericTransform is responsible for rendering each component in the ReportFrameBean, and an XML layout definition file is responsible for the actual arrangement of the GUI components in the ReportFrameBean (that is, the toolbars, browsers, report grid, and so on).
Because ReportFrameGenericTransform inherits from AbstractLayoutTransform, it is layout-enabled— that is, the arrangement of GUI components in the report frame is managed by an XML layout definition file rather than the transform class itself. ReportFrameLayout.xml is used to display report frame components in view mode, and ReportDesignModeFrameLayout.xml is used to display report frame components in design mode.
Adding or removing contained beans
Contained beans are those beans that are contained inside another bean. For example, the Report Execution page includes a Report Frame bean that consists of various components like the report grid itself, drilling editor, formatting editor, and so on. All these components are individual beans that are contained inside a container framework bean.
The examples below illustrate how to add or remove a bean that already exists in the application. They do not explain how to create a new bean, but focus instead on how to add or remove an existing bean within a container bean on a page within the application. For an explanation of how to create a new bean, refer to Customizing Web Beans.
To add a child bean to a container bean:
MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in for adding a child bean to a container bean. The following steps guide you in creating the plug-in and deploying it.
-
Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.
-
Click on Pages to expand the list of pages used in MicroStrategy Web.
-
Navigate to the page in which you want to add a child bean.
-
Expand the Beans node for that page.
-
Right-click the container bean that will hold the child bean and select New Bean. This launches the New Web Bean wizard that guides you in adding a child bean.
-
Save your changes.
For specific settings that affect whether customization changes are applied automatically or require a restart of the Web server, see Applying customization changes to the application.
To remove a child bean from a container bean:
MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in for removing a child bean from a container bean. The following steps guide you in creating the plug-in and deploying it.
-
Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations.
-
Click on Pages to expand the list of pages used in MicroStrategy Web.
-
Navigate to the page in which you want to add a child bean.
-
Expand the Beans node for that page.
-
Expand the container bean to view the child bean that you wish to remove.
-
Right-click the child bean and select Delete.
-
Save your changes.
For specific settings that affect whether customization changes are applied automatically or require a restart of the Web server, see Applying customization changes to the application.