Step 1 : Create a New Portal Application Project
After opening NWDS, create a new Portal Application Project using the wizard.
1. Navigate to File → New → Other
2. Browse through the available wizards: Portal Application -> Create a Portal Application Project.
3. Choose Next and change the name of your project (Overview Layout)
4. Choose Finish to complete the wizard. The new project is created.
Step 2 : Define the Page Layout as a Java Server Page
1. Navigate to Overview Layout → dist → PORTAL-INF → jsp.
2. Right-click on jsp folder and choose New → File.
3. Enter a file name and add the suffix .jsp. Your file must have the same name as your layout.
4. Choose Finish and your file is created.
5. With the help of the layout tag library, create a JSP page that defines the following:
a. One or more containers on the page in which iViews can be placed.
b. 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
refreshing, hiding, or personalizing the iView.
In our example we use the following jsp page:
<%@ taglib uri="prt:taglib:com.sap.portal.reserved.
layout.TagLibLayout" prefix="lyt"%>
<lyt:template>
<table id="GridLayout1" width="100%" cellSpacing="2">
<tr>
<td width="100%" valign="top" colspan="4">
<lyt:container id="top" wrappingMethod="none" />
</td>
</tr>
<tr>
<td width="25%" valign="top">
<lyt:container id="bottom1" wrappingMethod="none" />
</td>
<td width="25%" valign="top">
<lyt:container id="bottom2" wrappingMethod="none" />
</td>
<td width="25%" valign="top">
<lyt:container id="bottom3" wrappingMethod="none" />
</td>
<td width="25%" valign="top">
<lyt:container id="bottom4" wrappingMethod="none" />
</td>
</tr>
</table>
</lyt:template>
Step 3 : Update the portalapp.xml File
In our example we use the following portalapp.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<application>
<application-config>
<property name="SharingReference" value="com.sap.portal.pagebuilder"/>
</application-config>
<components>
<component name="overview">
<component-config>
<property name="ClassName"
value="com.sapportals.portal.pb.layout.PageLayout"/>
<property name="ResourceBundleName" value="pagebuilder_nls"/>
<property name="SafetyLevel" value="no_safety" />
</component-config>
<component-profile>
<property name="ComponentType"value="com.sapportals.portal.layout" />
<property name="com.sap.portal.reserved.layout.TagLibLayout"
value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>
<property name="com.sap.portal.pcm.Title" value="Overview (100,
25|25|25|25)"/>
<property name="com.sap.portal.pcm.Description" value="Overview
Layout (100% Top, 25% Bottom mostleft, 25% Bottom left, 25% Bottom
right, 25 Bottom mostright)"/>
<property name="com.sap.portal.reserved.layout.TemplateFile"
value="overview.jsp"/>
<property name="AuthScheme" value="anonymous" />
<property name="com.sap.portal.reserved.layout.Cont1"
value="top">
<property name="title" value="Top Column"/>
<property name="orientation" value="vertical"/>
</property>
<property name="com.sap.portal.reserved.layout.Cont2"
value="bottom1">
<property name="title" value="Bottom Column leftmost"/>
<property name="orientation" value="vertical"/>
</property>
<property name="com.sap.portal.reserved.layout.Cont3"
value="bottom2">
<property name="title" value="Bottom Column left"/>
<property name="orientation" value="vertical"/>
</property>
<property name="com.sap.portal.reserved.layout.Cont4"
value="bottom3">
<property name="title" value="Bottom Column right"/>
<property name="orientation" value="vertical"/>
</property>
<property name="com.sap.portal.reserved.layout.Cont5"
value="bottom4">
<property name="title" value="Bottom Column rightmost"/>
<property name="orientation" value="vertical"/>
</property>
<property name="XML_Template" value="<?xml
version="1.0" encoding="UTF-8"?><PageLayout
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../xsd/PBlayout.xsd"
layoutID="pcd:portal_content/templates/pcc/layouts/1Top4Bottom_(100__2
5_25_25_25)"
pageID="1Top4Bottom"><CustomAttributes><Attribute
key="JSP_Template"
value="gpar:/1Top4BottomLayout/1Top4Bottom"/></CustomAttrib
utes><TableLayout width="100%" height="100%"
cols="4"/><ContainersRow><Container
containerID="com.sap.portal.reserved.layout.Cont1"><TableCe
llData width="100%" height="100%" colSpan="4"
vAlign="top"/></Container></ContainersRow><Cont
ainersRow><Container
containerID="com.sap.portal.reserved.layout.Cont2"><TableCe
llData width="25%" height="100%" colSpan="1"
vAlign="top"/></Container><Container
containerID="com.sap.portal.reserved.layout.Cont3"><TableCe
llData width="25%" height="100%" colSpan="1"
vAlign="top"/></Container><Container
containerID="com.sap.portal.reserved.layout.Cont4"><TableCe
llData width="25%" height="100%" colSpan="1"
vAlign="top"/></Container><Container
containerID="com.sap.portal.reserved.layout.Cont5"><TableCe
llData width="25%" height="100%" colSpan="1"
vAlign="top"/></Container></ContainersRow></Pag
eLayout>" />
</component-profile>
</component>
</components>
<services/>
</application>
2.Deploy the New Layout to the Portal
Step 1 : Create EAR File
Optional: Mark “Include the source code of the portal application”.
Step 2 : Deploy the EAR File to the Portal
...
3.Configure the Layout for Use
Before you can use the new layout, you have to configure some settings.
Step1 : Create a PCD-Object
Overview Layout.
Step2 : Create a Delta Link
4.Result
When you are creating a new page, you can choose the new layout. As
soon as you are in the editing mode, the new overview layout is chosen and displayed as follows:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |