Edit Resource Catalog

You cannot edit the built-in resource catalogs, but you can create a custom resource catalog and define its structure and content as needed. The resources that you include in the resource catalog determine what users can include in their pages and page templates.

Creating a Resource Catalog Folder

To organize your catalog better, you can group similar resources together. For example, group all components together, or all resources from a particular tool or service.

To create a folder:

  1. In the Edit dialog, from the Add menu, select Folder.
  2. On the Target tab of the Edit Resource Catalog Item - Folder dialog, in the Name field, enter a name to display for the folder in the resource catalog.
  3. In the Description field, enter a brief description of the contents of the folder.
  4. Select Visible if you want to display the folder in the resource catalog.

    Alternatively, you can specify an EL expression to determine under which conditions the folder displays in the catalog. For example, to specify that the folder should be visible only to users with the Portal Manager role, use the following EL expression:

    #{WCSecurityContext.userInScopedRole['Moderator']}
    
  5. On the Options tab, set the display options for the folder:
    Option Description

    Small Icon URI

    Enter the path of an icon to display next to the resource when it appears in the Up menu in the catalog. The icon should preferably be 16 x 16 pixels in size.

    Tool Tip

    Enter the text to display when users hover the mouse over the resource in the catalog.

    New Attribute Name

    Enter the name of an attribute that has been defined for the resource but is not exposed in the dialog. You can also select an attribute from the drop-down list.

    New Attribute Value

    Enter a value for the attribute specified in the New Attribute Name field, and click Add.

    Tip:

    You can click Add even without specifying a value for the attribute. You can specify the value once the field is displayed in the dialog along with the other display options.

  6. On the Parameters tab, enter values for any parameters supported by the folder.

    You can also add custom parameters.

  7. Click OK.
  8. Click Save and Close.

    You can now add resources inside this folder, or move resources inside it by dragging and dropping them from the top level folder.

Creating a Custom Resource Catalog Component

The Resource Registry in WebCenter Portal provides a large repository of components that you can add to a resource catalog. However, if this is not sufficient and your business requires you to add other components, such as ADF Facelets components, custom JSF, or raw HTML, you can create a custom component and specify the XML code for the component. Using a custom component is the only way to make such components available to a page in the page editor.

  1. In the Edit dialog, from the Add menu, select Component.
  2. On the Target tab of the Edit Resource Catalog Item - Component dialog, in the Name field, enter a name to display for the component in the resource catalog.
  3. In the Description field, enter a brief description of the component.
  4. Select Visible if you want to display the component in the resource catalog.

    Alternatively, you can specify an EL expression to determine under which conditions the resource displays in the resource catalog. For example, to specify that the resource should be visible only to users with the Portal Manager role, use the following EL expression:

    #{WCSecurityContext.userInScopedRole['Moderator']}
    
  5. In the XML text area, enter the XML code for the component.

    The following are examples of custom components:

    • Output Text component:

      <af:outputText xmlns:af="http://xmlns.oracle.com/adf/faces/rich" 
                       value="Weather Forecast for the Day" id="#"/>
      
    • Custom navigation:

      <af:forEach xmlns:af="http://xmlns.oracle.com/adf/faces/rich" 
                  var="level_1_menu"
                   items="#{SiteStructureContext.defaultSiteStructure.listModel['startNode=/, includeStartNode=false']}">
      <af:outputText id="#" 
                     xmlns:af="http://xmlns.oracle.com/adf/faces/rich" 
                     value="#{level_1_menu.title}"/>
      </af:forEach>
      
    • External HTML content:

      <f:verbatim xmlns:f="http://java.sun.com/jsf/core">
        <![CDATA[
          <object width="640" height="385">
            <param name="movie" value="http://www.youtube.com/v/KO2ti-B00gw&hl=en_US&fs=1">
            </param>
            <param name="allowFullScreen" value="true">
            </param>
            <param name="allowscriptaccess" value="always">
            </param>
            <embed src="http://www.youtube.com/v/KO2ti-B00gw&hl=en_US&fs=1" 
                   type="application/x-shockwave-flash" allowscriptaccess="always" 
                   allowfullscreen="true" width="640" height="385">
            </embed>
          </object>]]>
      </f:verbatim>
      

      An alternative is to create a new task flow and add an HTML Markup component inside it.

  6. On the Options tab, set the display options for the component you are adding, if applicable.
    Field Applies to Description

    Path

    Links

    Enter the URL to access the resource. The URL format is different depending on what you are linking to:

    • Task Flow: taskflow://Path_to_Task_Flow/Task_Flow_Definition_File_Name#Task_Flow_ID

    • Portlet: portlet://Producer_ID/Portlet_ID

    • Content: content://Content_Connection_ID/Document_ID

    If you do not know the location, click the Select icon to browse for available resources.

    Note: In the Select dialog, the Select button is active only when you select a resource that can be included in the navigation model. For example, if you expand the Portlets node and select a portlet producer, then the Select button is disabled. If you expand the portlet producer and select a portlet, then the Select button is enabled.

    Repository

    Resources that require a repository connection

    The name of the connection used to lookup the resource.

  7. On the Parameters tab, enter values for any parameters supported by the component.

    You can also add custom parameters.

  8. Click OK.
  9. Click Save and Close.

Adding a Resource to the Resource Catalog

You can add different types of resources to a custom resource catalog from the Resource Registry.

To add a resource from the Resource Registry to a custom resource catalog:

  1. In the Edit dialog, from the Add menu, select Add From Library.

    Tip:

    To add a resource within a new folder, select Folder to create a folder first and then click Add.

  2. In the Add Resource Catalog Item dialog, in the left panel, select a type of resource. If you know what you are looking for, you can also enter it in the Search field.
  3. In the right panel, navigate to the resource you want to add to the resource catalog.
  4. Optionally, in the Name field, enter a different name to use for the resource in your resource catalog. This does not change the name of the resource in the library.

    Note:

    If you select multiple resources, you cannot rename them at this point. You can, however, edit them later.

  5. Click Add.

    Notes:

    • Avoid adding a data control more than once in a resource catalog. The data control is added to the resource catalog as many times, but when you use the resource catalog to populate a page or task flow, you will not be able to add accessors, methods, or attributes from such data control instances.

    • The Design Time data controls folder lists all the WebCenter Portal tools and services data controls. However, adding the ConnectionsNetworkDC and KudosServiceDC data controls at runtime is not supported. Avoid adding these data controls to your page or task flow.

  6. Click Save and Close.