Oracle® Fusion Middleware User's Guide for Oracle WebCenter Spaces 11g Release 1 (11.1.1.5.0) Part Number E10149-07 |
|
|
View PDF |
In planning and building your portal, you may find it useful to offer a wide selection of page styles to the users who add pages to your portal. It may also be useful to restrict page styles so that users build only the types of pages that you intend.
This chapter provides information about default, out-of-the-box page styles included with WebCenter Spaces and the custom page styles that you add your portal.
This chapter includes the following sections:
See Also:
For general information about adding and editing different types of resources, see Chapter 10, "Working with the Resources that Compose a Portal or Community."Audience
This chapter is intended for users who want to provide and manage page styles in a WebCenter Spaces application. By default, users with an application-level role that includes the permissions Application: Manage All
and Page Styles: Create, Edit, and Delete Page Styles
or a Space role that includes the permissions Administration: Manage All
and Resources: Create, Edit, and Delete Resources
can perform the actions described in this chapter.
When users create a page, a Create Page dialog opens with a selection of page styles (Figure 15-1).
Page styles describe the layout of a newly created page and may also dictate the type of content the page supports. For example, the Wiki page style provides a one-column layout and automatic connection to Oracle Content Server, which provides wiki services; a Blank page style provides a one-column layout and has few restrictions on the types of content users can add to the pages that are based on it.
All page styles are provided to the Create Page dialog through the Resource Manager (Figure 15-2).
Figure 15-2 Application-Level Resources Manager
Application-level page styles are provided on the Resources page accessed through the Administration link. Space-level page styles are provided on the Resources page in the administration settings for a Space.
The difference between application- and Space-level page styles is one of scope:
Application-level page styles are available to all spaces.
Space-level page styles are available only in the space in which they reside.
There may be more page styles available on the Resources tab than appear in a Create Page dialog. The site administrator and the Space moderator determine which page styles are shown in the dialog through the following considerations:
Is the page style shown or hidden?
For more information, see Section 15.4.1, "Showing and Hiding a Page Style in the Create Page Dialog."
Has the page style been configured to appear in specific Spaces (custom application-level page styles only)?
For more information, see Section 15.4.1, "Showing and Hiding a Page Style in the Create Page Dialog."
WebCenter Spaces offers a range of page styles out of the box (default page styles) and provides a means of copying page styles and editing their source (custom page styles). You can also download custom page styles, bring them into Oracle JDeveloper for additional customization, and upload them back into WebCenter Spaces. The difference between default and custom page styles is one of flexibility: many of the actions available to custom page styles are not available to default page styles.
Table 15-1 compares the types of actions authorized users can perform on default and custom page styles in WebCenter Spaces.
Table 15-1 Actions Available to Default and Custom Page Styles
Action | Default | Custom | More Information |
---|---|---|---|
Upload |
Yes |
Yes |
|
Download |
No |
Yes |
|
Preview |
Yes |
Yes |
This control provides a means of previewing the page style. Select a page style and click Preview to render the page style in a page. |
Copy |
Yes |
Yes |
|
Security Settings |
No |
Yes |
|
Delete |
No |
Yes |
|
Hide/Show |
Yes |
Yes |
Section 15.4.1, "Showing and Hiding a Page Style in the Create Page Dialog" |
Edit Source |
No |
Yes |
Section 15.3, "Editing the Source Code of a Custom Page Style" |
Edit Properties |
No |
Yes |
|
About |
Yes |
Yes |
Table 15-2 lists, and describes the default page styles provided with WebCenter Spaces out of the box.
Table 15-2 Default Page Styles
For both application- and Space-level page styles, the About action opens a dialog that provides information about the selected page style. For more information, see Section 10.1.5, "Viewing Information About a Resource."
There is no direct way to create a page style in WebCenter Spaces. That is, no Create button is available for starting this process. To create a new page style, you must first copy an existing style and then revise its source code in the source code editor or through JDeveloper. Or, you can create a page style in JDeveloper and upload it to WebCenter Spaces.
For information about revising a page style's source code, see Section 15.3, "Editing the Source Code of a Custom Page Style." For information about copying a page style, see Section 15.4.4, "Copying a Page Style." For information about working with WebCenter Spaces page styles in Oracle JDeveloper, see the section, "Developing and Uploading WebCenter Spaces Resources," in Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.
Source editing enables you to work with the source code of a custom page style. For example, you can upload a page style you create in JDeveloper and perform additional adjustments to it through the Edit Source dialog. You can even create a style from scratch in the Edit Source dialog, but this entails a lot of hand coding, and we do not recommend it.
This section provides information about editing custom page style source and steps you through the process of editing a custom page style. It includes the following subsections:
See Also:
For general information about editing the source of a resource, see Section 10.3.2, "Editing the Source Code of a Resource."Use the Edit Source dialog to expose the underlying code of a selected custom page style and make adjustments to it. For example, you can create a new page style in JDeveloper, upload it to WebCenter Spaces through the Resource Manager, preview it, and edit the source to make adjustments.
In contrast, you can copy a default page style, download the copy to your local drive, bring it into JDeveloper for customization, upload it back into WebCenter Spaces, and open it in the Edit Source dialog for further adjustments.
You can simply copy a default page style and make adjustments to the copy's source in the Edit Source dialog.
You can even create a page style from the beginning, by copying another page style, and then replacing its code with your own original code through the Edit Source dialog. Note, however, that, due to the heavy hand-coding requirement, we do not recommend this scenario.
In the Edit Source dialog, the custom page style source is presented on two tabs: Page and Page Definition. The Page tab source defines the page layout and style. The Page Definition tab source holds parameter definitions and task flow and data control bindings. Each represents the underlying *.jspx
page and page definition file that comprise the page style.
Example 15-1 illustrates custom page style encoding. It creates a basic page that is designed to flow and provide two columns that are 35 percent and 65 percent in proportion. This is an example of a custom page style that was created in JDeveloper, imported into WebCenter Spaces, and opened in the Edit Source dialog Page tab for minor revisions. The relevant code is in bold.
Example 15-1 Source Code of a Custom Page Style
<?xml version='1.0' encoding='utf-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:pe="http://xmlns.oracle.com/adf/pageeditor" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:trh="http://myfaces.apache.org/trinidad/html" version="2.1"> <jsp:directive.page deferredSyntaxAllowedAsLiteral="true"/> <jsp:directive.page contentType="text/html;charset=utf-8"/> <f:view> <af:document title="#{pageDocBean.title}" id="docrt"> <af:form usesUpload="true" id="f1"> <af:pageTemplate value="#{bindings.shellTemplateBinding.templateModel}" id="T"> <f:facet name="content"> <pe:pageCustomizable id="pcl1"> <af:panelGroupLayout id="pgl1" layout="scroll" styleClass="replace_with_scheme_name" inlineStyle="replace_with_inline_style"> <trh:tableLayout id="tl1" width="100%"> <trh:rowLayout id="rl1"> <trh:cellFormat id="cf1" width="35%" valign="top"> <cust:panelCustomizable id="hm_pnc1" layout="scroll"/> </trh:cellFormat> <trh:cellFormat id="cf2" width="65%" valign="top"> <cust:panelCustomizable id="hm_pnc2" layout="scroll"/> </trh:cellFormat> </trh:rowLayout> </trh:tableLayout> <trh:tableLayout id="tl2"/> </af:panelGroupLayout> <f:facet name="editor"> <pe:pageEditorPanel id="pep1"/> </f:facet> </pe:pageCustomizable> </f:facet> </af:pageTemplate> </af:form> </af:document> </f:view> </jsp:root>
The following procedure works equally for custom page styles edited in a Space and those edited at the application level
To edit the source of a custom page style:
Go to the Space or application-level Resources page, and select Page Styles from the panel on the left.
Tip:
You can use "pretty URLs" to navigate to the Resources page:Application-level Resources page:
http://host:port/webcenter/spaces/admin/resources
Space-level Resources page:
http://host:port/webcenter/spaces/spaceName/admin/resources
Select the custom page style, and then from the Edit menu select Edit Source to open the selected page style in the Source Editor (Figure 15-3).
Make changes to the source according to your requirements.
When finished, click OK to save your changes and close the editor.
This section provides information about managing your seeded and custom page styles. It includes the following sections:
When you create a page style, by default it is hidden. A hidden page style is not available for use in the application, the Home Space, or any other Space. To make a page style available, it must be marked as shown. Further, for a page style created at the application level, you can control whether it is available to any, all, or selected Spaces in the application. Finally, you can set access on a selected page style through its security settings.
For information about a page style's security settings, see Section 15.4.3, "Setting Security on a Custom Page Style."
For information about a page style's exclusion settings, see Section 10.4.2, "Setting Properties on a Resource."
For information about hiding and showing application resources, including page styles, see Section 10.4.3, "Showing and Hiding Resources."
You can control a page style's display attributes and availability by setting its properties in the Edit Properties dialog. Setting page style properties follows the same procedure as any other resource. For more information, see Section 10.4.2, "Setting Properties on a Resource."
Tip:
To view the properties associated with a resource, use the About option.In addition to the default attributes exposed through the Edit Properties dialog (Display Name, Description, and the like), you can expose any custom attributes built into an custom page style. The Edit Properties dialog provides a Custom Attributes section for entering attribute name/value pairs (Figure 15-4).
Figure 15-4 Attributes Section of Edit Properties Dialog
For example, the following custom attribute is available to all custom page styles:
editPageAfterCreation
This custom attribute controls whether a newly created page opens in edit or view mode. It takes a value of true
or false
:
Enter ${true}
to open a newly created page in edit mode. This is the default value.
Enter ${false}
to open a newly created page in view mode.
When you associate this custom attribute with a particular page style, every time a user creates a page based on that style, the attribute value is considered and the page behaves accordingly.
You can control whether all users or only specific users or groups can access the page style that you created in your application or Space. Setting access to a page style follows the same procedure as any other resource. For more information, see Section 10.4.4, "Setting Security for a Resource."
You can make a copy of a page style by selecting it and choosing Copy from the Edit menu on the Resources - Page Styles page. Copying a page style follows the same procedure as any other resource. For the generic procedure, see Section 10.4.1, "Copying a Resource."
Provided you are assigned the required permissions, you can delete any custom page style. Deleting a page style follows the same procedure as any other resource. For more information, see Section 10.4.5, "Deleting a Resource."
You can preview how a page style will look by selecting it on the Resources - Page Styles page and clicking Preview. For more information, see Section 10.4.6, "Previewing a Resource."
Once you have made a page style available (see Section 15.4.1, "Showing and Hiding a Page Style in the Create Page Dialog"), you can apply it by selection. That is, when you create a page, the page style is shown as one of your options in the Create Page dialog, depending on where you have exposed it (for example, at the application level, in a Space, in a selection of Spaces, or in the views of selected users or groups). To apply a page style, select it in the Create Page dialog.
Tip:
For information about accessing the Create Page dialog, see Section 17.2, "Creating Pages."If you want to create a page style that is beyond the editing capabilities of WebCenter Spaces, you can download the page style, import it into Oracle JDeveloper for editing, and then upload it back to WebCenter Spaces. You can upload page styles directly to WebCenter Spaces from within JDeveloper or through WebCenter Spaces.
The steps to upload and download page styles from WebCenter Spaces are described in Section 10.5.2, "Downloading a Resource," and Section 10.5.3, "Uploading a Resource."
For information about editing resources and uploading custom resources to WebCenter Spaces through JDeveloper, see the section, "Developing and Uploading WebCenter Spaces Resources," in Oracle Fusion Middleware Developer's Guide for Oracle WebCenter.