40 Working with Global Attributes Across Portals

Use the Attributes page in WebCenter Portal Administration to manage global attributes, which can be used by any portal in WebCenter Portal.

Permissions:

To perform the tasks in this chapter, you must have the WebCenter Portal Administrator role or a custom role that grants at least the following permission:

  • Portal Server: Manage All or Portal Server: Manage Configuration

For more information about permissions, see About Application Roles and Permissions.

About Global Attributes

Every portal includes built-in attributes such as name, description, date created, icon, and so on. In addition to these built-in attributes, portal managers can add custom attributes that are unique to the portal and its characteristics to specify additional portal information (metadata). Custom attributes are propagated throughout a portal. For information about working with attributes unique to a specific portal, see Working with Portal Attributes in Building Portals with Oracle WebCenter Portal.

In addition to portal-specific attributes, system administrators can add and manage global attributes from the Attributes page in WebCenter Portal Administration. Global attributes are available for use by any portal.

Figure 40-1 WebCenter Portal Administration: Attributes

Description of Figure 40-1 follows
Description of "Figure 40-1 WebCenter Portal Administration: Attributes"

Custom attributes of a private portal are internal and cannot be accessed by a user who does not have access to the portal. For custom attributes to be accessible either the portal should be public or the user must have access to the private portal. Otherwise, you can include global attributes in your portal that are available for use by any portal.

A custom attribute is simply a name value pair (such as customerId=400, orderId=11, or userName=Smith). For example, you can use a global attribute in a portal for customer analysis purposes with several custom task flows that take the parameter customerId as an input: task flows such as Customer Sales History, Customer Satisfaction Rating, Future Sales Prospects, or Customer Contact Information. With a custom attribute defined named customerId with an appropriate value, all the task flows that can accept a customerId can display information specific to that customer.

A custom attribute can also be retrieved using Expression Language (EL) expressions. For example, an EL expression may read a value that is passed in through the URL that displays a portal (for example, customerid=10). Any portal pages, task flows, or portlets that deliver customized content based on parameter values can accept global custom attribute values and display content accordingly using the following Expression Language (EL) syntax to access the global custom attribute value:

#{WCAppContext.application.applicationConfig.customAttributes[attributeName]}

If you need EL assistance, an application developer can provide an EL expression; see Expression Language Expressions in Developing for Oracle WebCenter Portal.

Adding a Global Attribute

To add a new global attribute for use by any portal:

  1. On the Settings page (see Accessing the Settings Pages in WebCenter Portal Administration), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/admin/attributes

    See Also:

    WebCenter Portal Pretty URLs in Building Portals with Oracle WebCenter Portal.

  2. On the Attributes page, click Add Attribute (Figure 40-2).

    Figure 40-2 WebCenter Portal Administration: Add Attribute

    Description of Figure 40-2 follows
    Description of "Figure 40-2 WebCenter Portal Administration: Add Attribute"

    The Add Attribute dialog opens (Figure 40-3).

    Figure 40-3 Entering Custom Attribute Name and Value

    Description of Figure 40-3 follows
    Description of "Figure 40-3 Entering Custom Attribute Name and Value"
  3. Enter a unique Name for the attribute. Valid names start with an alphabetic character and contain only alphanumeric characters
  4. Enter a Value for the custom attribute. The value you type is treated as a string value. A value is optional for global attributes.
  5. Click Add to save the custom attribute.

Editing a Global Attribute

To edit a global attribute:

  1. On the Settings page (see Accessing the Settings Pages in WebCenter Portal Administration), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/admin/attributes

    See Also:

    WebCenter Portal Pretty URLs in Building Portals with Oracle WebCenter Portal.

  2. On the Attributes page, click the Actions icon for the attribute and select Edit Attribute.
  3. In the Edit Attribute dialog, modify the attribute Value. The value you type is treated as a string value.
  4. Click OK to save your changes.

Deleting a Global Attribute

To delete a global attribute:

  1. On the Settings page (see Accessing the Settings Pages in WebCenter Portal Administration), click Attributes.

    You can also enter the following URL in your browser to navigate directly to the Attributes page:

    http://host:port/webcenter/portal/admin/attributes

    See Also:

    WebCenter Portal Pretty URLs in Building Portals with Oracle WebCenter Portal.

  2. On the Attributes page, click the Actions icon for the attribute and select Delete Attribute.
  3. In the confirmation dialog, click Delete.