The <components> element defines the portal components that are part of this application, and includes configuration information for each. The element includes one or more <component> elements, each of which defines one portal component.
The following is an example of a <components> element:
<components> <component name="CP_SEARCH"> <component-config> <property name="ClassName" value="com.sap.portal.MyComponent"/> <property name="SafetyLevel" value="low_safety"/> </component-config> <component-profile> <property name="url" value=""/> <property name="transformers.pipe" value=""/> </component-profile> </component> </components>
Each <component> element contains a name attribute, which defines the name of the component.
Component Configuration
Each <component> element contains a <component-config> element, which provides static configuration that cannot be changed by an administrator or personalized by an end user.
The following are standard properties for component configuration:
Name |
Description |
---|---|
AuthRequirement |
The initial minimal authentication needed to execute the component. This property is supported for backward compatibility only. The property can be one of the following values:
|
AdminResourceBundleName |
The name of the component's administration resource bundle, which is used to store localized text strings for use in the administration environment, such as property editor for the iView created from this portal component.. The resource bundle should be placed in the /PORTAL-INF/private/classes folder. Specify the resource without the .properties extension but include the file in the WAR with the extension. If you use this property, you should also configure the propertyIdMapping property (see below). |
ClassName |
The name of the implementation class of the portal component. |
ComponentType |
The type of component, which can be one of the following:
The property is not required. If blank, an implementation of IPortalComponent must be specified by the ClassName property. |
JSP |
If ComponentType is set to jspnative , this property specifies the path of the JSP page that implements the portal component. This path is relative to the PORTAL-INF folder). |
mode |
This property is used to specify delegate components to be called for specific modes. For more information, see Delegation . |
ResourceBundleName |
The name of the component's runtime resource bundle, which is used to store localized text strings for use in the component. The resource bundle should be placed in the /PORTAL-INF/private/classes folder. Specify the resource without the .properties extension but include the file in the WAR with the extension. |
SafetyLevel |
The safety level for the component. For more information, see Permission Model . |
Component Profile
Each <component> element contains a <component-profile> element, which provides configuration that can be changed by an administrator or personalized by an end user. For each property, different values can be set for each iView derived from the component, and for each end user (if personalization is permitted).
The following are standard properties for a component profile:
Name |
Description |
---|---|
ALLOW_BROWSER |
Indicates whether the portal uses the browser cache to render the component. The value can be one of the following:
|
CachingLevel |
The scope of the cache, which can be one of the following:
|
EPCFLevel |
Indicates whether the enterprise portal client framework (EPCF) is used. If two or more embedded iViews with different EPCFLevel values are rendered on a page (within the same frame), the effective level is computed as the maximum of all EPCFLevel values on the page. The property can have the following values:
The default value is level 2 . |
propertyIdMapping |
A preset property for mapping resource keys to the attributes. Should be used in conjunction with the AdminResourceBundleName (see above). For example: <property name="propertyIdMapping" value=""> <property name="administration" value="NO_DIALOG"/> <property name="test-longDescription" value="test.i000-lD"/> <property name="test-plainDescription" value="test.i001-pD"/> </property> |
ValidityPeriod |
The length of time, in milliseconds, that the cache is valid. |
The component can also define custom parameters.
Each <component-profile> property can have the following sub-properties, or meta-attributes, that define the property's personalization behavior or provide information for administration tools:
Name |
Description |
---|---|
category |
The category under which the property appears in the property editor. |
description |
A string key that can be resolved by the component's resource bundle to a string that represents the name for the property that appears in the property editor. |
inheritance |
Indicates whether any changes in this property within a descendent object is recognized by the Portal Runtime.
Not matter the setting of the inheritance sub-property, a descendent object can store a different value for the property. The inheritance sub-property determines whether this value has any effect. A descendent object may have a different value for the property, but with the inheritance sub-property set to final , this value has no effect. If the inheritance sub-property is changed to non-final , the changed value in the descendent object would then have an effect. Note
You cannot set the inheritance sub-property to final in an iView unless that iView specifies a value for the property. |
longDescription |
The name for the property that appears in the property editor. This meta-attribute is a text attributes, and is translatable. |
personalization |
Indicates whether this property can be personalized. The value can be one of the following:
The default is no-dialog . |
plainDescription |
The description for the property that appears in the property editor. This meta-attribute is a text attributes, and is translatable. |
type |
The property type. This value determines what types of controls are displayed for modifying this property. The value can be one of the following:
|
validvalues |
A list of valid values for the property. The property displays a dropdown list with these values for the property. The valid values are specified as a string, which is a concatenation of all the values, each of which is specified in the following format: <characters in next value>/<value> For example, the following specifies the options ABC , DEFGH , X : 3/ABC5/DEFGH1/X You can also provide a display name for each valid value by adding a sub-property called validValueTitle <index> , where index is the position of the value in the validvalues sub-property. The index starts at 0. For example, the property validValidTitle0 sets the display name for the first valid value ( ABC ), validValueTitle1 sets the display name for the second valid value ( DEFGH ), and so forth. |
These sub-properties have no meaning to the Portal Runtime. They are used during personalization or at design time by administration tools.
The following is an example of the declaration of a property named Color with sub-properties personalization and type:
<property name="Color" value="Red"> <property name="personalization" value="dialog"/> <property name="validvalues" value="3/Red5/Green"/> </property>