cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify com.sap.portal.navigation.pagetoolbar.par

Former Member
0 Kudos

Hi Experts,

I have to create a link on the Page Toolbar(Next to "History") by the name "Add Favorites" which has the same functionality as that of the "Add to Portal Favorites" button present in the Option Menu in sap portal.

I have imported the com.sap.portal.navigation.pagetoolbar.par in to my nwds , but i am not sure if this is the correct par.

please tell me where exactly the modification needs to be done.

Thanks in advance .

Regards

Shivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shivas,

PageToolbar.class file can be found under com.sap.portal.navigation.pagetoolbar\private\lib\com.sap.portal.navigation.pagetoolbar_core.jar file

Decompile the file and redeploy the par after making the changes.

Regards,

Vaibhav

Former Member
0 Kudos

Hi Vaibhav,

Can you please elaborate how to modify PageToolbar.class file, I need to create a link to the left of history link.

I need to provide the functionality to directly add the favorites to portal favorites using the on click of this link.

I was trying to edit the lightPageToolbar.jsp file but even after making some changes in the code, nothing was reflected back in portal.

I have one more requirement in the organise entries iview, please help me in locating the par file for the same.

Regards

Shivas

MaheshChandra
Active Contributor
0 Kudos

change the jsp file and add new link using html tags table, tr, td without deleting original code, and Import it to portal with new name , dont replace the existing one (not advisable). create an iview with imported par file and preview it. and check with the result. if working fine add it to default framework and make default pagetoolbar as invisible and new one visible.

check this link for [organize entries iview,|http://www.sdn.sap.com/irj/scn/advancedsearch?query=pagetoolbar+modify#rltop] for hiding/removing entry you don't need par file customization

regards

Mahesh

Former Member
0 Kudos

This message was moderated.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Tobias,

we are also having same requirement of adding the Favorites Tab separately on the toolBar beside the History and back/forward button.

we have only one JSP lighttoolbar.jsp in the standard par downloaded from portal.

i assume we should create a new JSP for toolbar but i am not sure where to refer the same.

please give us your valuable inputs .

guide us through procedure how to get a link "add to favorites" on the tool bar itself calling the functionality

With Regards,

Tushar.

hofmann
Active Contributor
0 Kudos

Hi,

the PAR you are looking for is: com.sap.portal.pageToolbar

As for the code: copy & paste the standard SAP code. For adding the page to the portal favorites:

AddToPortalFavorites(). The code looks like:


function AddToPortalFavorites(target , title, mode)
{
	try
	{
		
		var obj = EPCM.getSAPTop().gHistoryFrameworkObj.GetActiveTrackingEntryValue();
		var context = obj.context;
		if(! target)
		{
			target = obj.getUrl();
			title = GetUnescapedTitle(obj.title);
		}
		var url = "/irj/servlet/prt/portal/prtroot/com.sap.km.cm.remote?ServiceType=PortalFavorites&";
		url += ("NavigationTarget=" + escape(target));
		url += ("&Title=" + encodeURIComponent(title));
.
.
.

-> the JS with this code is located ar:

/irj/portalapps/com.sap.portal.navigation.helperservice/scripts/FrameworkSupport.js

To add the page to the browser's favorites:

pageTitleBar.AddToFavorites("location")

br,

Tobias

Former Member
0 Kudos

Hi Tobias

Can u please help me to navigate to the com.sap.portal.pageToolbar.par all i can find is com.sap.portal.pagebuilder.par related to the page.

Regards

Shivas

hofmann
Active Contributor
0 Kudos

sorry, the name of the iView is: com.sap.portal.pageToolbar

The PAR is: com.sap.portal.navigation.pagetoolbar.par.

The java class for creating the HTML: com.sapportals.portal.navigation.PageToolbar, located inside the PAR at:

PORTAL-INF\private\lib\com.sap.portal.navigation.pagetoolbar_core.jar\com\sapportals\portal\navigation\PageToolbar.class

When you decompile this class, you'll see that the pagetoolbar isn't using a JSP file for creating the HTML output. It's using HTMLB:


com.sapportals.htmlb.Document myDocument = myContext.createDocument("pageTitlebarDocu");
com.sapportals.htmlb.Form myForm = myContext.createFormDocument("pageTitlebar");

and for the Javascripts:


if(showFavorites)
   scriptBuffer.append("pageTitleBar.showFavorites = true;");
if(showPortalFavorites)
   scriptBuffer.append("pageTitleBar.showPortalFavorites = true;");

br,

Tobias

Former Member
0 Kudos

This message was moderated.