When you register an application manually, you create an asset for the application, create an asset for each of its views, and associate the view assets with the application asset in the Admin interface. You can enable the registration asset types FW_Application
and FW_View
on AdminSite.
Topics:
Learn how you can register an application and its views by registering the Articles sample application and its view.
See Working with the Articles Sample Application. Articles has a single view of type iframe
. The same steps apply to JavaScript and HTML views.
To manually register an application and view:
Create or get an icon to represent your application. (The icon will be displayed in the applications bar.)
The Articles sample application uses the articles.png
image file located in: /sample app/articles/src/main/webapp/images/
Create a file that specifies the layout of the application in HTML, that is, for each view, create a placeholder element to hold the content rendered by the view.
For example, layout.jsp
(for the Articles sample application) contains the following line:
<div id="articles" style="float:left;height:100%;width:100%" class="wemholder"></div>
The view's contents are rendered within the placeholder element when the application is displayed (layout.app
renders the application's layout; home.app
renders the view).
Note:
When creating the layout file, specify a unique Id for the placeholder element. You will specify the same Id for the Parent Node attribute when creating the view asset. Use class="wemholder"
for the placeholder elements.
Register the view and application.
Log in to the Admin interface as a general administrator, navigate to the AdminSite and expand the Admin node, where the FW_View
and FW_Application
asset types are enabled.
(We assume you will create the view and application assets in the same session, in which case both assets will be listed on the History tab. When creating the application asset, you will select the view asset from the History tab and associate it with the application asset. The History tab is volatile; it is cleared after the user's session. Assets can be permanently placed on the Active List tab. See Oracle Fusion Middleware Administering Oracle WebCenter Sites.)
Create an instance of the FW_View
asset type:
Click New, select New FW_View, and set attributes. (The following figure displays attribute values for the view asset of the Articles sample application.)
Figure 66-1 Attribute Values for the View Asset
Name: Enter a short descriptive name for this view asset.
Parent Node: Enter the id
of the placeholder element (defined in step 2 of Registering Applications in WEM Framework) that will hold the content rendered by the view.
View Type: Select one of the following options to specify how the view's contents should be rendered in the placeholder:
Iframe
: Renders the view in an iframe into the placeholder element
IncludeHTML
: Renders HTML into the placeholder element
IncludeJavaScript
: Renders JavaScript into the placeholder element
Source URL: Enter the URL that provides contents for the view. For example, Source URL for the Articles sample application takes the following value: http://localhost:9080/articles-1.0/home.app
Create an instance of the FW_Application
asset type:
Click New, select New FW_Application, and set attributes. (The following figure displays attribute values for the application asset of the Articles sample application.)
Figure 66-2 Attribute Values for the Application Asset
Name: Enter a short descriptive name for this application asset.
ToolTip: Enter the text that will be displayed over the application's icon when users hover over the icon.
Icon URL: Enter the URL of the icon that represents the application. The icon will be displayed on the login page and at the top of the WEM interface. For example, the Icon URL for the Articles sample application takes the following value: http://localhost:9080/articles-1.0/images/articles.png
Hover Icon URL: Enter the URL of the icon that represents the application when users place mouse over the icon.
Click Icon URL: Enter the URL of the icon that represents the application when users click the icon.
Active Icon URL: Enter the URL of the icon that represents the application when it is in use.
Layout Type: LayoutRenderer
(the default and only value). Layout Type is used by the UI container to render the application's views by using the application's layout page (specified below in the Layout URL attribute).
Layout URL: Enter the URL of the page that displays the application's layout. The layout page has only HTML placeholder elements (such as div) for placing the view(s).
For example, Layout URL for the Articles sample application takes the value: "http://localhost:9080/articles-1.0/layout.app"
rather than ".../layout.jsp"
, given the Spring MVC framework.
Related: Associated FW_View: views: Select the view asset created in step 3 of Registering Applications in WEM Framework (click the History tab, select the view asset, and click Add Selected Items).
With the FW_View asset type you can register views of your application. And, you can use the FW_Application asset type to register your application.
Topics:
This asset type is used to register the views of an application. For each view, create an instance of FW_View
. Attributes of FW_View
are listed in the table below as they appear in the Admin interface and in the REST API Bean Reference for Oracle WebCenter Sites. This asset type is enabled on the site named AdminSite.
Table 66-1 FW_View
Asset Type Attributes
Attribute: WebCenter Sites Interface | Attribute: REST API | Description |
---|---|---|
Name |
|
Short descriptive name for this view asset. |
Description |
|
Description of this view asset. |
Parent Node |
|
ID of the placeholder element in the application's layout file. The placeholder element holds the content rendered by the view. The layout file has only HTML placeholder elements (such as |
View Type |
|
How the view should be rendered. The following view types are available:
|
Source URL |
|
URL that provides content for the view. |
JavaScript |
|
Required if The content specified by this attribute is included in a script tag if |
Content |
|
Required if |
This asset type is used to register the application. The asset type is enabled on AdminSite. Attributes of FW_Application
are listed in the table below as they appear in the Admin interface and in the .
Table 66-2 FW_Application
Asset Type Attributes
Attribute: WebCenter Sites Interface | Attribute: REST API | Description |
---|---|---|
Name |
|
Short descriptive name for this application asset. |
Description |
|
Description of this application asset. |
Tooltip |
|
Text that is displayed on the application's icon when users place mouse over the icon. |
Icon URL |
|
URL of the icon that represents the application in the WEM Framework. |
Hover Icon URL |
|
URL of the icon that represents the application when users place mouse over the icon. |
Click Icon URL |
|
URL of the icon that represents the application when users click the icon. |
Active Icon URL |
|
URL of the icon that represents the application while it is in use. |
Layout Type |
|
Type of layout. The value is Layout Type is responsible for rendering the application's views by using the application's layout page (specified in the Layout URL attribute). |
Layout URL |
|
URL of the page where the application's layout is displayed. This page has only HTML placeholder elements (such as |
Related: Associated FW_Application: extends |
|
Parent application which the current application extends. |
Related: Associated FW_View: views |
|
List of view assets used in this application. |