Strategy ONE
New Bean based on an Existing System Bean
You use the Web Customization Editor to create a new bean based on an existing system bean and to automatically add it to a MicroStrategy Web page. The editor uses the values you select or supply to create a <web-bean> node for the new bean in the Page Configuration file. The values you select or supply are used as the values for either attributes or child nodes of the new <web-bean> node.
You use the same Web Customization Editor to add a new custom bean that you have created to a MicroStrategy Web page.
Once you have added a new bean using the Web Customization Editor, you can use the new bean wherever a system bean can be used, such as in the src parameter of the URL or in <web:displayBean> MicroStrategy custom tags within page-template or page-section files.
The table below lists the attributes that the Web Customization Editor creates for the new <web-bean> node.
| Attribute | Description |
|---|---|
|
name
|
Use this attribute to identify the web bean to a MicroStrategy Web page. The value of this attribute is used in the src parameter in the URL to specify the bean on the page that should handle the event and in the <web:displayBean> MicroStrategy custom tag in a page-template or page-section file to specify the bean that should be rendered on the page. |
|
sys-bean
|
Use this attribute to specify the name that will be used to generate the name of the bean class that the bean creation infrastructure will look for and use to instantiate the custom bean. |
|
|
Use this attribute to specify the fully-qualified name of an event handler class to associate with the bean. If specified, this event handler will override any default event handler for the custom bean. |
|
|
Use this attribute to specify whether state information for the bean should be saved. 0 - not persisted (default) 2- requests 4 - preferences 8 - session |
|
Use this attribute to specify one or more features (that is, preferences, privileges, or settings) that will determine whether the bean will be instantiated. Multiple features must be separated with semi-colons, and features that must be false, rather than true, for the bean to be instantiated must be prefixed with “!”. When you include multiple features, you can mix features that must be true with those that must be false. Refer to Using Web Features for a more detailed explanation of feature-based conditionality. |
The table below lists the child nodes that the Web Customization Editor creates for the new <web-bean> node.
| Node | Description |
|---|---|
|
<init-properties>
|
Use the <property> nodes under this child node to specify name-value pairs for properties that should be set in the bean instance immediately after the custom bean is created. |
|
<request-properties>
|
Use the <property> nodes under this child node to specify name-value pairs for properties that should be set in the bean instance after the state of the custom bean is restored. |
|
<event-handlers> |
Use the <event-handler> nodes under this child node only to define event handlers for implicit child beans (that is, child beans that are defined within the code of the parent bean rather than in the bean hierarchy in the Page Configuration file). Use the event-handler attribute described above to define the event handler for the parent bean For a more detailed explanation of the difference between using anevent-handlerattribute and an<event-handler>child node, refer to Pages under Application Settings for the Web Customization Editor.. |
|
Use a <style> node under this child node to associate the definition of a style from the Style Catalog with the parent <web-bean> node. Use child <property> nodes under the <style> node to modify the style definition using name-value pairs. Refer to Styles and Beans and Rendering Beans for Display for a more detailed description. The values for this child node are not requested by the Web Customization Editor during bean creation. However, you can supply values by choosing to edit the custom bean after it has been created by the editor. |
You can create a hierarchy of child beans for the custom bean.
| Node | Description |
|---|---|
|
<web-beans> |
Use this child node to group one or more child <web-bean> nodes of the parent bean. |
