MicroStrategy ONE

Web Beans and Web GUI Components

This section discusses the <web-components> element, which is a child of a <template> element in the Page Configuration file. The <web-components> element allows you to build upon an already-defined <web-bean> in the same page. It can have multiple <web-component> child elements.

Do not confuse the <web-component> elements (called Web GUI Components in the MSDL) with objects generated using the WebComponent interface (called Web Page Components in the MSDL). See Use of the Term Web Components in the MSDL for a detailed discussion of the differences between these two.

The properties of a Web Bean specify the kind of data it can contain and how it should execute and interact with the MicroStrategy Intelligence Server. However, the bean knows nothing about how its data should be displayed to the end user. Instead, a transform, through a style associated with the bean, renders the data. The bean can be associated with a style in several ways, but it is a good practice to make the association by designing a <web-component> on top of the bean. The <web-component> (that is, the Web GUI Component) combines the bean with a style, as shown in the code samples below:

Sample <web-component> defined in the Page Configuration file:

<web-components>

  <web-componentbase-bean="fb"feature-id="" is-container="" name="folder_browser"style-name="FolderStyleIcon"style-type="catalog"/>

    ...

</web-components>

Associating a <web-bean> with a style in a <web-component> provides a better user experience because this allows the application to perform partial page updates after certain manipulations, rather than refreshing the entire page.

Sample <web-bean> defined in the Page Configuration file:

<web-beanname="fb"persist-mode="2" sys-bean="FolderBean">

  ...

</web-bean>

Sample <style> defined in the Style Catalog Configuration file:

<Styledescription="Style: Display Folder in icon view"name="FolderStyleIcon"transform="FolderViewTransform">

  ...

</style>

A <web-component> can represent a menu rather than a bean, but this is an infrequent use.

Sample menu <web-component> defined in the Page Configuration file:

<web-components>

  <web-componentis-container=""name="custom_Menu"type="element" subtype="menu"/>

    ...

</web-components>

Using Web GUI Components provides certain advantages.

  • You can combine a style directly with the bean in a Web GUI Component.

  • You can define the feature-id necessary to view or use a  Web GUI Component.  

  • You can take advantage of inline frames that allow dynamic partial updates of pages where a Web GUI Component is used.