A layout consists of a layout JSP page and a portalapp.xml file. The files are packaged in a portal application archive file (EAR) and deployed to the portal.
You can define several layouts in a EAR by providing for each layout a JSP page and a <component> element in the portalapp.xml file.
With the help of the layout tag library, create a JSP page that defines the following:
One or more containers on the page in which iViews can be placed.
The iView tray, or frame, in which each iView is placed. If you do not specify a tray, the portal displays the default tray, which provides links to standard tray functions, such as hiding, refreshing or personalizing the iView.
You can specify one tray for each container. The tray is displayed for all iViews in the container.
Additional HTML that appears on each page.
For more information on creating a layout JSP page, see Layout Tag Library.
Create a <component> element in a portalapp.xml file for the EAR and set the name attribute. Create one <component> element for each layout defined in the EAR.
In the <component> element's <component-config> element, create the following <property> elements:
Property |
Mandatory |
Description/Value |
---|---|---|
ClassName |
Yes |
com.sapportals.portal.pb.layout.PageLayout |
ResourceBundleName |
Yes |
pagebuilder_nls |
In the <component> element's <component-profile> element, create the following <property> elements:
Property |
Mandatory |
Description/Value |
---|---|---|
ComponentType |
Yes |
com.sapportals.portal.layout |
com.sap.portal.pcm.Title |
No |
The display name of the layout |
com.sap.portal.pcm.Description |
No |
A layout description |
com.sap.portal.reserved.layout.TemplateFile |
Yes |
The name of the JSP page that defines the layout (relative to the PORTAL-INF\jsp directory) |
com.sap.portal.reserved.layout.Cont1, com.sap.portal.reserved.layout.Cont2, and so on |
Yes |
Each container defined in the JSP must have a property in the portalapp.xml. The names of these properties should end in ContX, where X is a sequence number starting at 1. The value is a name for the container. |
LayoutTagLibrary |
Yes |
/SERVICE/com.sap.portal .pagebuilder/taglib/layout.tld |
For each container profile property described above, you can include the following meta-properties:
Property |
Mandatory |
Description |
---|---|---|
plainDescription |
Yes |
The display name of the container |
orientation |
Yes |
Container orientation, which must be set to vertical |
designClass |
No |
A CSS class for wrapping the HTML tag created by the container:
For more information about wrappingMethod, see container and containerWithTrayDesign. |
Place the JSP pages in the PORTAL-INF/jsp directory, and create an EAR file with your JSP pages and deployment descriptor.
Deploy the EAR file.