on 09-07-2010 1:46 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.