4 Working with the WebCenter Portal Asset Application Template
Use the WebCenter Portal asset application template to create, modify, and publish assets for use in WebCenter Portal.
About the WebCenter Portal Asset Application Template
You can use the WebCenter Portal Asset application template to create asset applications for the following asset types:
Layouts define the basic properties of a page, such as the number and relationship of columns, and are part of a page's page style. For more information, see Developing Layouts.
Page Styles define the layout of a newly created page, and may also dictate the type of content the page supports. For more information, see Developing Page Styles.
Page Templates define the interface that surrounds page content and help to apply a consistent look and feel across groups of pages. For more information, see Developing Page Templates.
Skins define the appearance and look and feel, including colors and fonts, of a specific portal or the entire application. For more information, see Developing Skins.
Visualization Templates determine the layout of content in a task flow that is created at runtime. Visualization templates can also include objects that can be bound to any data visualization that is added to the task flow. For more information, see Developing Visualization Templates.
Content Presenter Display Templates define templates for displaying content. For more information, see Developing Content Presenter Display Templates.
The resulting asset applications include a default WebCenter Portal Asset Archive deployment profile that you can use to publish the asset to WebCenter Portal across a Portal Server Connection.
Creating a WebCenter Portal Asset Application
To create or edit WebCenter Portal assets in JDeveloper that can be published to WebCenter Portal, you start by creating a WebCenter Portal asset application using the WebCenter Portal Asset Application template. The application defines the asset type (for example, a page template) that you want to create or modify. Within that application, you can then define or edit properties for the asset, and finally, publish it to WebCenter Portal as a shared or portal-specific asset.
How to Create a WebCenter Portal Asset Application
To create a WebCenter Portal asset application:
- From the Navigation pane, click New Application (or click the New Gallery icon and select Application).
The New Gallery displays (Figure 4-1).
Figure 4-1 New Gallery
Description of "Figure 4-1 New Gallery"
- Select WebCenter Portal Asset Application and click OK.
The Application Name page of the Create WebCenter Portal Application wizard displays (Figure 4-2).
Figure 4-2 Create WebCenter Portal Asset Application - Step 1
Description of "Figure 4-2 Create WebCenter Portal Asset Application - Step 1"
- Enter an Application Name, optionally choose a Directory other than the default to store your application, and then click Next.
The Project name page of the Create WebCenter Portal Application wizard displays (Figure 4-3).
Figure 4-3 Create WebCenter Portal Asset Application - Step 2
Description of "Figure 4-3 Create WebCenter Portal Asset Application - Step 2"
- Enter a Project Name for the project and click Next.
You can optionally change the Directory to store your project in, but note that the Project Name is automatically appended to the path. The Project Java Settings page of the Create WebCenter Portal Application wizard displays (Figure 4-4).
Figure 4-4 Create WebCenter Portal Asset Application - Step 3
Description of "Figure 4-4 Create WebCenter Portal Asset Application - Step 3"
- Optionally update the Project Java Settings fields for the asset project and click Next.
The Portal Asset page of the Create WebCenter Portal Application wizard displays (Figure 4-5).
Figure 4-5 Create WebCenter Portal Asset Application - Step 4
Description of "Figure 4-5 Create WebCenter Portal Asset Application - Step 4"
- Select the Asset Type (for example,
Page Template), optionally change the Display Name (note that your changes will be applied to the directory path and file name), optionally add a Description for the asset project, optionally change the Directory where the asset will be created, and click Finish. After the asset application has been created it appears in the Navigation pane (Figure 4-6).
Figure 4-6 Newly Created Portal Asset Application
Description of "Figure 4-6 Newly Created Portal Asset Application"
How to Create Multiple WebCenter Portal Assets in an Application
Using WebCenter Portal asset application template, you can create an application of one asset type. For each asset in WebCenter Portal, you have to create a new application. Creating new application for each asset is a maintenance hazard.
This section shows how to create multiple asset in an application. In this section, two asset types, portal template and skin, are used to create multiple assets in an application.
- Create an asset application. Name the application as PortalAssets and project as PortalTemplate. Select the Asset type as Portal Template.
Note the directory structure of Portal Template would be in the following format:
- Create another asset application. Name the application as PortalSkinApplication and project as PortalSkins. Select the Asset type as Skin.
Note the directory structure of skin would be in the following format:
- Navigate to the
myworkfolder, where asset applications are located:.For example, .
- Copy the PortalSkins folder ( .
./mywork/PortalSkinApplication/PortalSkins) to the PortalAssets folder (
- In Jdeveloper, right-click your portal asset application and click Open Project.
- Navigate to the PortalSkins folder
(./mywork/PortalSkinApplication/PortalSkins)and open the
PotalSkins.jprfile to verify if PortalSkins application is loaded in the PortalAssets application.
Repeat the steps to add more asset types to the application.
Now you’ll see that multiple assets are under the same application.
- When you are done with the development of the asset, you can deploy your assets separately. See Publishing a WebCenter Portal Asset.
What You May Need to Know About Asset Application Artifacts
When you create a WebCenter Portal asset application, you create a single named workspace and a single named project (
PortalAsset by default) in that workspace. A WebCenter Portal asset application project follows JDeveloper's standard for a Web application. It has the same structure and contains all of the features as an ADF Fusion Web application's ViewController project plus the following WebCenter Portal specific features:
Asset Publishing - lets you publish an asset application to WebCenter Portal.
Page Editor- lets you consume page components and perform runtime customizations within the Oracle Application Development Framework (Oracle ADF).
Customization Components - also lets you consume Composer components and perform runtime customizations within the Oracle Application Development Framework (Oracle ADF).
The asset project is seeded with Fusion ViewController's default JSP Tag and JDeveloper libraries plus some WebCenter Portal specific JSP Tag and JDeveloper libraries. It contains a Default Package named
portal, which is also used, for example, as the folder name for
After an asset application has been created, you can change the values for asset-specific properties, such as
displayName and the
Description, by editing the
assetDef.xml file under
Creating and Editing WebCenter Portal Assets
After creating an asset application, as described in Creating a WebCenter Portal Asset Application, you are now ready to define or modify properties for the asset. Table 4-1 shows where to find further information about creating and modifying the different types of assets. After creating the asset, continue by publishing it to WebCenter Portal (see Publishing WebCenter Portal Assets) where you can test and debug it (see Testing WebCenter Portal Assets).
Table 4-1 Creating WebCenter Portal Assets
|Asset Type||More Information|
Content Presenter Display Templates
Publishing WebCenter Portal Assets
This section describes the steps for publishing WebCenter Portal assets to WebCenter Portal as a shared or portal-specific asset.
This section contains the following topics:
Creating a WebCenter Portal Server Connection
Before you can publish an asset to WebCenter Portal as a shared asset or to a specific portal, you need to set up a connection to the target Portal Server. Use the WebCenter Portal Server connection dialog to configure a connection to a Portal Server. You can set the connection up either as an application resource, or as an IDE connection that can be reused in other asset applications.
To create a WebCenter Portal Server connection:
- Open the Portal Server Connection dialog by doing one of the following:
From the Resources Catalog, click New and select IDE Connections > WebCenter Portal Server...
From the Application Resources pane, right-click Connections and select New Connection > WebCenter Portal Server...
The WebCenter Portal Server Connection dialog displays (Figure 4-7):
Figure 4-7 WebCenter Portal Server Connection Dialog
Description of "Figure 4-7 WebCenter Portal Server Connection Dialog"
- For the Create connection in options, choose Application Resources to configure a Portal Server connection specific to the current application, or choose IDE Connections to save the connection as an IDE resource that can be used for other applications.
If you will be creating and publishing multiple assets, Oracle recommends that you choose to save the connection in IDE Connections. To add an IDE connection to an asset application, select it from the IDE Connections node in the Resource Catalog, and either right-click the connection and select Add to Application, or drag it to the Connections node under the Application Resources node in the Applications panel.
- Enter a name for the Portal Server connection you are setting up. Note that only alphanumeric characters can be used.
- Enter the Host name and Port assignment for the Portal Server you are connecting to. For the host, you can enter either the fully qualified domain name,
localhost, or the server name.
- Enter a valid username and password for the Portal Server you are connecting to.
- After completing your entries, click Test Connection to make sure the connection works. Note that if the connection test fails due to the server being offline, the connection will still be set up, and can be used once the server is again available.
Although the Service Path field is not editable, you can use the field to copy and paste into a browser to determine the REST endpoint for the server connection.
Publishing a WebCenter Portal Asset
After creating a WebCenter Portal asset, the next step is to publish it and test it in WebCenter Portal.
To publish a WebCenter Portal asset:
- Right-click the Portal Asset project node and select Deploy and the default deployment profile to deploy (Figure 4-8).
Figure 4-8 Deploying a WebCenter Portal Asset
Description of "Figure 4-8 Deploying a WebCenter Portal Asset"
The Deploy Asset wizard displays (Figure 4-9).
Figure 4-9 Deploy Asset Wizard - Deployment Action Page
Description of "Figure 4-9 Deploy Asset Wizard - Deployment Action Page"
- On the Deploy Action page, select Deploy to WebCenter Portal and click Next.
The Portal Server page displays (Figure 4-10).
Figure 4-10 Deploy Asset Wizard - Portal Server Page
Description of "Figure 4-10 Deploy Asset Wizard - Portal Server Page"
- If you've configured a Portal Server connection, select Shared Assets or the specific portal for the Portal Server connection to which to publish the asset. If you have not previously configured a Portal Server connection, click the Add icon and complete the Portal Server connection fields as shown in Creating a WebCenter Portal Server Connection.
- Click Finish to deploy the asset, or click Summary to see a summary of your deployment selections before deploying.
- Open the Deployment - Log pane and check the status of the deployment. You can also click on the target URL on the Portal Server to view the recently deployed asset.
Testing WebCenter Portal Assets
After creating or modifying an asset application and publishing the asset to WebCenter Portal, you can continue by testing the runtime results. Note that you must test the asset within WebCenter Portal’s runtime. You can iterate by modifying the asset in the JDeveloper, republishing to Portal Server, and then validating in WebCenter Portal. There are two ways to republish: you can either right-click on the Portal Asset project node > Deploy > use the recently used deployment item, or use the default Alt-Shift-P shortcut key.
To change or view shortcut key settings, go to Tools > Preferences > Shortcut Keys > and search for “Republish Portal Asset” or other shortcut key.
To help with the debug process, you can ask an Administrator (or someone with Administrator rights) for the test or staging environment to configure error messages and the calling stack to display in the runtime. For more information, see Viewing and Configuring Error Messages in WebCenter Portal in Administering Oracle WebCenter Portal.