Skip to Content
Author's profile photo Former Member

Create a SITEMAP for your portal

Introduction

Due to popular demand, i have decided to post this weblog which shows you how to create a

sitemap

for your portal.

image

Jar required:

com.sap.portal.navigation.serviceapi.jar

Step 1:

Create a Dynpage project using NWDS or Eclipse wizard.

image

Step 2:

Add the following lines of code to your Dynpage component

package com.ust.sitemap;

/* Built By: Prakash Singh

  • Technical Consultant

  • Universal System Technologies, Inc

  • 2500 W. Lake Mary Blvd., Ste 212-A

  • Lake Mary, FL 32746 USA

  • M 407-474-2216

*/

import java.util.Hashtable;

import java.util.Iterator;

import java.util.Locale;

import com.sapportals.htmlb.Form;

import com.sapportals.htmlb.GridLayout;

import com.sapportals.htmlb.GridLayoutCell;

import com.sapportals.htmlb.Group;

import com.sapportals.htmlb.Tree;

import com.sapportals.htmlb.TreeNode;

import com.sapportals.htmlb.enum.CellVAlign;

import com.sapportals.htmlb.enum.GroupDesign;

import com.sapportals.htmlb.page.DynPage;

import com.sapportals.htmlb.page.PageException;

import com.sapportals.portal.htmlb.page.PageProcessorComponent;

import com.sapportals.portal.navigation.INavigationNode;

import com.sapportals.portal.navigation.INavigationService;

import com.sapportals.portal.navigation.NavigationNodes;

import com.sapportals.portal.prt.component.IPortalComponentRequest;

import com.sapportals.portal.prt.component.IPortalComponentResponse;

import com.sapportals.portal.prt.runtime.PortalRuntime;

public class display extends PageProcessorComponent {

     public DynPage getPage() {

          return new displayDynPage();

     }

     public static class displayDynPage extends DynPage {

          /**

          

  • Initialization code executed once per user.

           */

          public void doInitialization() {

          }

          /**

          

  • Input handling code. In general called the first time with the second page request from the user.

           */

          public void doProcessAfterInput() throws PageException {

          }

          /**

          

  • Create output. Called once per request.

           */

          public void doProcessBeforeOutput() throws PageException {

               Form myForm = this.getForm(); // get the form from DynPage

               Group group = new Group();

               group.setDesign(GroupDesign.SAPCOLOR);

               group.setTitle(“Site Map”);

               myForm.addComponent(group);

               GridLayout gl = new GridLayout();

               group.addComponent(gl);

               IPortalComponentRequest request =

                    (IPortalComponentRequest) this.getRequest();

               IPortalComponentResponse response =

                                   (IPortalComponentResponse) this.getResponse();

            try {

               NavigationNodes rootNodes = getrootnodes();

               int i = 1;

               for(Iterator it = rootNodes.iterator(); it.hasNext();){

                    INavigationNode rootNode = (INavigationNode)it.next();

                    String title =  rootNode.getTitle(Locale.ENGLISH);

                    Tree tree = new Tree(title, “”);

                    tree.setRootNodeIsVisible(true);

                    GridLayoutCell cell = new GridLayoutCell(rootNode.getName());

                    String text = “

BAM! you got yourself a nice sitemap

image

Assigned Tags

      123 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      May I also have the JAR files?
      Thank you in advance!

      areerat.goo@gmail.com

      Author's profile photo Former Member
      Former Member
      HI,

      Can u please send me the par file.

      my email id is bej.chitta@gmail.com

      Author's profile photo Former Member
      Former Member
      HI,

      Can u please send me the par file.

      my email id is bej.chitta@gmail.com

      Author's profile photo Dheerendra Shukla
      Dheerendra Shukla
      Hi
      Really nice work, can you send the par file to me at dheerendrashukla@gmail.com.

      Thanks

      Author's profile photo Former Member
      Former Member
      This is really great idea. I am wondering if i can get the par and jar files?
      Author's profile photo Former Member
      Former Member
      This is really great idea. I am wondering if i can get the par and jar files?
      Author's profile photo Richard Palotai
      Richard Palotai
      Could you pls. also send me the source.
      My email is rpalotai@ebc.hu.

      Many thx.
      Richard

      Author's profile photo Altuğ Dağlı
      Altuğ Dağlı
      Can you send me the .jar file?

      I want to use it...

      Author's profile photo Eray Ince
      Eray Ince
      Can you send jars to eray.ince@fitcons.com Please.
      Thanks
      Best Regards
      Author's profile photo Former Member
      Former Member
      My customer required portal site map.

      Can you send relevant jars to limchan@skcc.com?

      Thanks
      Best Regards

      Author's profile photo Former Member
      Former Member
      could you please send me the useful files.

      mail: fatih_koekce@yahoo.de

      many thanks in advance,
      Fth

      Author's profile photo Former Member
      Former Member
      You did a great job,could i get the par file?
      Thank you in advance.
      My E-mail:andyliu@hjoy.com.tw

      Best Regards,Andy

      Author's profile photo Former Member
      Former Member
      You did a great job,could i get the par file?
      Thank you in advance.
      My E-mail:andyliu@hjoy.com.tw

      Best Regards,Andy

      Author's profile photo Former Member
      Former Member
      Adny,
      Can  you kindly send me the com.sap.portal.navigation.serviceapi.jar file.
      Thanks.
      James
      ajloren2000@yahoo.com
      Author's profile photo Former Member
      Former Member
      Hi, anyone can send me the file com.sap.portal.navigation.serviceapi.jar

      tirinlosar@hotmail.com

      Thank you

      Author's profile photo Former Member
      Former Member
      Hi, someone can tell me if it is possible to change the colors of the tree cells?

      Thank you

      Author's profile photo Sushil Aher
      Sushil Aher
      Hi Prakash,
      Good work!!!! Can you please send me the PAR file for this.

      My ID is, sushil.aher@gmail.com

      Thanks

      Author's profile photo Former Member
      Former Member
      Please send me the required JAR: com.sap.portal.navigation.serviceapi.jar at michael_reed@valpak.com
      Author's profile photo Former Member
      Former Member
      Could you please send me the required jar i.e. com.sap.portal.navigation.serviceapi.jar to jayant.deb@ust.net
      Author's profile photo Former Member
      Former Member
      Could you please send me the required jar i.e. com.sap.portal.navigation.serviceapi.jar to gloria.appelgren@lan.com
      Author's profile photo Bharat Mistry
      Bharat Mistry
      Dear Prakash,

      Please provide me the com.sap.portal.navigation.serviceapi.jar
      file at mail id bharatvmistry@gmail.com

      Regards,
      Bharat Mistry

      Author's profile photo Former Member
      Former Member
      Dear Prakash,

      May I have your com.sap.portal.navigation.serviceapi.jar
      file
      at mail id kanokon.k@gmail.com

      Thank you very much,
      Kanok-on K.

      Author's profile photo Daniel Fernando Ulloa Martínez
      Daniel Fernando Ulloa Martínez
      Could you please send me the required jar at danielf4444@gmail.com
      Author's profile photo Former Member
      Former Member
      You can find the jar in your portal @

      System Configuration > Support > Portal Runtime > Browse Deployment > WEB-INF > deployment > pcd > com.sap.portal.navigation.service.par.bak

      Download the zip file, extract it and add the com.sap.portal.navigation.api_service_api.jar as an external jar to your Portal Application project

      Author's profile photo Former Member
      Former Member

      Hi Prakash,

      Can you send me the file par to ashvindevil@hotmail.com, please?

      Can you also send me the jar com.sap.portal.navigation.serviceapi.jar?


      Thank you,

      Regards,

      Ashvin

      Author's profile photo Former Member
      Former Member

      Does the code end with String text = " ???

      Author's profile photo Amey Mogare
      Amey Mogare

      Hello Prakash,

      Thanks for great blog.

      Sorry, about asking this, but I am not able to locate definition of method 'getrootnodes' in this.

      I see in replies that people have found it but I am not able to locate it.

      Could you please share?