In this lesson, you will create a basic WebCenter Portal application. WebCenter provides an application template that provisions the new application with WebCenter Portal files and libraries – everything you need to develop and deploy a portal.
You will play the role of a portal developer assigned the task of developing the basic structure of the portal. By selecting the option to configure your application with standard portal features, you will ensure that all the necessary portal artifacts, like templates, catalogs, skins, default page, and the Resource Manger, are generated in the application. This will reduce the time required to develop your application.
As a developer, you will learn in this lesson how to work with the existing application template, and then in "Creating a New Page Template with a New Portal Skin" how to modify and change that default page template.
At the end of this lesson, the page you create will look like Figure 3-1 when you log in as Administrator and open the page in a web browser.
This lesson contains the following steps:
Before you begin the steps in this lesson, ensure you have followed the steps up to this point in the Tutorial.
Let's begin by creating a WebCenter Portal application, using the WebCenter wizard for creating new portal applications. The wizard uses an out-of-the-box Portal Application template that ensures the appropriate application components are included.
After you create your portal application, you can then configure the necessary connections to a database and content repository, as described in Chapter 6, "Connecting to and Managing Content Repositories."
To create a WebCenter Portal application:
In Oracle JDeveloper, in the Application Navigator, choose the New Application icon (Figure 3-2) and click it to launch the application wizard.
In the New Gallery, under the General category, select Applications.
Now in the Items list, navigate down the list and select WebCenter Portal Application, then click OK (Figure 3-3).
On the Application Name tab, in the Application Name field, enter
MyPortalApplication, as shown in Figure 3-4. Click the Browse button in the Directory field to specify the directory on your system where you want your portal application to reside.
In the Application Package Prefix field (shown in Figure 3-4), enter
The Name your project dialog appears in the wizard, as shown in Figure 3-5. On the Project Name tab, in the Project Name field, note that the project is named
Portal by default.
On the Project Java Settings tab, in the Default Package field (Figure 3-6), note that the project package is named
my.portal.application.portal by default. A source root directory and an output directory are also specified by default.
The Configure WebCenter settings dialog appears, as shown in Figure 3-7. Ensure that the checkbox Configure the application with standard Portal features is checked.
Oracle JDeveloper now configures and generates the base XML files, offline databases, page flows, web pages, business components, web services, binding files, and enterprise Java Beans available for you to build and deploy your WebCenter Portal application, as shown in the MyPortalApplication Overview window (Figure 3-8).
Return to the folders of your portal application in Application Navigator. A collapsed view of the folders shows your default project as named Portal, with Application Sources and Web Content as sub folders, shown in Figure 3-9.
Note PortalWebAssets is also a project. PortalWebAssets are intended to include static resources, like HTML and image files, in a newly created portal web assets project.
Following the steps in the Wizard, your WebCenter Portal application is now populated with a portal project, named Portal, and a static application resources project called by default PortalWebAssets. Your portal project includes features like site navigation, page hierarchies, delegated administration, security, page templates, and runtime customizing. Your portal application can consume portlets, incorporate content management services, and include WebCenter social computing services. PortalWebAssets include static application resources like HTML and image files. By separating the static resources into a separate project, you can deploy those resources to a dedicated server.
Now expand the various folders and sub folders, like catalogs, navigators, page hierarchy, pages and page templates (shown in Figure 3-10), for a view of the logical structure and parent-child relationships created in your portal application.
Now you need to change the context root of the portal application. Right-click Portal project and choose the Project Properties menu item, as shown in Figure 3-11.
Select the Java EE Application node in the
Javadoc list, which appears in the Java EE Application dialog. In the Java EE Web Context Root field, enter
mytutorial, as shown in Figure 3-12, and click OK.
Ensure that the Java EE web context root is set to
Right-click the Portal project and choose Run to run the application.
Oracle JDeveloper now builds the application out of the box and displays the default portal page Home in a web browser, as shown in Figure 3-13.
Initially, this portal displays a single page, rendered as
Home page is based on the seeded Globe page template (discussed in the next section), which provides all the initial functionality of the portal, including a banner, a login form with User Name and Password fields, and a navigation menu with a single link element --
Home -- displayed on the web page.
In the upper right corner of the
Home page, in the User Name field (Figure 3-14), you can log into the Home page. Enter
weblogic as the User Name. (Note that the weblogic user is seeded in the integrated WebLogic Server.) In the Password field, enter
Figure 3-15 shows the portal Home page with Administrator privileges enabled after successfully logging in.
Note that Administrator privileges are now enabled because you can see the Administration link in the upper right corner of the web browser. This means the user, specified here as
weblogic, has administration privileges for the portal.
For more information on creating an application based on the WebCenter Portal Application template, see “Preparing Your Development Environment” in the Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.
When you create a portal, you will base its look and feel on a page template. Page templates enable you to maintain a consistent look and feel across all the pages in your portal, and typically determine the artifacts, like banners, footers and navigation bars, that surround the main content of the page.
Using JDeveloper, you can create and publish page templates. In addition, you can also modify them to meet specific design or runtime requirements in your portal application.
By selecting the Configure the application with standard Portal features option, as shown in Figure 3-7, "Configure WebCenter Settings - Step 4 of 5", two seeded, out-of-the-box templates are added by default to your portal application:
pageTemplate_globe.jspx (shown in Figure 3-17) and
pageTemplate_swooshy.jspx (Figure 3-18).
Both templates offer essentially the same functionality but with a different set of graphics.
To view the
Navigate to the
pagetemplates folder in your portal project.
Double-click the folder and select the
pageTemplate_globe.jspx file, as shown in Figure 3-16.
Right-click the page template and choose Open. The file opens in JDeveloper, as shown in Figure 3-17.
Ensure that you select the Design tab in the lower left corner.
Figure 3-17 shows the
pageTemplate_globe.jspx page template with each of its page features and artifacts (enumerated below) called out with their corresponding numbers in the illustration.
A link to the portal home page
A tag line
A welcome message
A link to the seeded Administration page
A login area that converts to a logout link when users are logged in
A navigation bar
An area for adding content to pages based on the template
A copyright notice
Figure 3-18 shows the
pageTemplate_swooshy.jspx page template, but without each of its page features and artifacts enumerated.
Using JDeveloper, you can modify and edit this default page template to meet your particular requirements. You can also create and build your own page template, as we discover in the next lesson in this Tutorial, ensuring that it has a common navigation bar, footer, and banner, then leave it up to your content contributors to populate the portal with content at runtime.
Following the steps outlined in this Tutorial, you have created a new portal application using Oracle JDeveloper.
In the next lesson, you will learn how to modify and edit an existing page template, with the goal of customizing its behavior to meet the particular needs of your end users. By completing that task, you will create a new page template in your portal application, further customizing its look and feel, and then set that template as an application resource.