Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
1,765

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="&lt;?xml

version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;PageLayout

xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation=&quot;../xsd/PBlayout.xsd&quot;

layoutID=&quot;pcd:portal_content/templates/pcc/layouts/1Top4Bottom_(100__2

5_25_25_25)&quot;

pageID=&quot;1Top4Bottom&quot;&gt;&lt;CustomAttributes&gt;&lt;Attribute

key=&quot;JSP_Template&quot;

value=&quot;gpar:/1Top4BottomLayout/1Top4Bottom&quot;/&gt;&lt;/CustomAttrib

utes&gt;&lt;TableLayout width=&quot;100%&quot; height=&quot;100%&quot;

cols=&quot;4&quot;/&gt;&lt;ContainersRow&gt;&lt;Container

containerID=&quot;com.sap.portal.reserved.layout.Cont1&quot;&gt;&lt;TableCe

llData width=&quot;100%&quot; height=&quot;100%&quot; colSpan=&quot;4&quot;

vAlign=&quot;top&quot;/&gt;&lt;/Container&gt;&lt;/ContainersRow&gt;&lt;Cont

ainersRow&gt;&lt;Container

containerID=&quot;com.sap.portal.reserved.layout.Cont2&quot;&gt;&lt;TableCe

llData width=&quot;25%&quot; height=&quot;100%&quot; colSpan=&quot;1&quot;

vAlign=&quot;top&quot;/&gt;&lt;/Container&gt;&lt;Container

containerID=&quot;com.sap.portal.reserved.layout.Cont3&quot;&gt;&lt;TableCe

llData width=&quot;25%&quot; height=&quot;100%&quot; colSpan=&quot;1&quot;

vAlign=&quot;top&quot;/&gt;&lt;/Container&gt;&lt;Container

containerID=&quot;com.sap.portal.reserved.layout.Cont4&quot;&gt;&lt;TableCe

llData width=&quot;25%&quot; height=&quot;100%&quot; colSpan=&quot;1&quot;

vAlign=&quot;top&quot;/&gt;&lt;/Container&gt;&lt;Container

containerID=&quot;com.sap.portal.reserved.layout.Cont5&quot;&gt;&lt;TableCe

llData width=&quot;25%&quot; height=&quot;100%&quot; colSpan=&quot;1&quot;

vAlign=&quot;top&quot;/&gt;&lt;/Container&gt;&lt;/ContainersRow&gt;&lt;/Pag

eLayout&gt;" />

</component-profile>

</component>

</components>

<services/>

</application>

2.Deploy the New Layout to the Portal

   Step 1 : Create EAR File

      1. Right-click your project folder.
      2. Choose Export.
      3. Navigate to SAP NetWeaver Portal EAR File and choose Next.  



      1. Search for your layout project and choose Next.
      1. Optional: On the next screen you can change the name of your EAR file and its location.

   Optional: Mark “Include the source code of the portal application”.


      1. Choose Finish. The EAR file is created.


Step 2 : Deploy the EAR File to the Portal

...

      1. Navigate to the Deployment view in NWDS. If it is not yet opened, navigate to Window Open Perspective Other. Choose Deployment from the list.  



      1. Import your EAR file from the workspace.
      2. Click Start to 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

  1. Navigate to Content Administration Portal Content Administration Portal Applications->

Overview Layout.


  1. Right-click your layout and choose Copy.
  2. Navigate to Content Administration Portal Content Administration Portal Content.
  3. Choose a folder, or create a new one where you’ll store your layout.
  4. Right-click the folder and choose Paste as PCD Object.





  1. Enter the metadata of your layout.


  1. Choose Next.
  2. Choose Finish. Your layout is created as a PCD object.

Step2 : Create a Delta Link

          1. Right-click the new PCD object and choose Copy.
          2. Navigate to Portal Content Templates WPC Templates Layouts.
          3. Right-click the folder and choose Paste.


          1. Choose Create a delta link on the next screen


          1. Choose Next.
          2. Choose Finish. Your layout is ready for use.

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:





 

 


2 Comments
Labels in this area