on 04-13-2005 3:00 PM
Hello,
I am using NW 04.
My Portal is connected to an LDAP, which it takes the users from there. When a user logges-in the Masthead says: "Hello <first_name> <last_name>".
The <first_name> & <last_name> parameters are taken from the LDAP Server.
Now, I would like to take a different attributes for <first_name> & <last_name> which exsists at Active Directory to display at the portal.
I have downloaded the current MastHeah iView from:
System Administration -> Support -> Support Desk -> Portal Runtime -> Browse deployment
And imported it into the NWDS.
I am stuck at this point, since I can't find how this iView takes the <first_name> & <last_name> parameters and how I can change it to take different ones.
Hi Roy,
In <b>HeaderiView.jsp</b> the following java code is getting the info. What attribute are you trying to put in the welcome message?
private String GetWelcomeMsg(IPortalComponentRequest request, String welcomeClause)
{
IUserContext userContext = request.getUser();
if (userContext != null)
{
String firstName = userContext.getFirstName();
String lastName = userContext.getLastName();
String salutation = userContext.getSalutation();
if ((firstName != null) && (lastName != null))
{
if(salutation != null)
{
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, salutation}).toString();
}
else
{
return java.text.MessageFormat.format(welcomeClause, new Object[] {firstName, lastName, " "}).toString();
}
}
else
{
return java.text.MessageFormat.format(welcomeClause, new Object[] {userContext.getUniqueName()," ", " "}).toString();
}
}
return "";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
10X Prakash, but now I have more critical problem.
As I said, I've impotred this PAR to the NWDS with a Project Name that I selected: HebMastHead.
Now, even if I don't make any change at all, when I am uploading the PAR file back into the portal it doesn't load. The exception I receive is this:
Caused by: java.lang.ClassNotFoundException: com.sapportals.portal.navigation.HeaderiView
Found in negative cache
-
Loader Info -
ClassLoader name: [com.sapportals.portal.prt.util.ApplicationClassLoader@17139a4]
Parent loader name: [sap.com/HebMastHead]
References:
not registered!
Resources:
C:
usr
sap
J2E
JC00
j2ee
cluster
server0
apps
sap.com
irj
servlet_jsp
irj
root
WEB-INF
portal
portalapps
HebMastHead
private
classes
Hi Roy,
After you have imported the project in NWDS. Don't change anything except the <b>HeaderiView.jsp</b>. Leaving everything that way it is. Don't change portalapp.xml either. Don't delete any of the following files under following folder.
dist\PORTAL-INF\private\exlib->com.sap.portal.navigation.mastheadcore.jar
dist\PORTAL-INF\exlib->com.sap.portal.navigation.mastheadapi.jar
And another Q:
Since I would like to take different attributes I assume I need to connect to LDAP and retreive it. Well, I've created a portal service which is doing that and I want to use it in this PAR file.
I am using it in DynPro succefully like this:
<property name="SharingReference" value="sap.com/LDAPService"/>
But when I refer it like this (And add the propar jar file as an external jar) at this PAR it can't find it.
Why is that?
I've already tried tried
<property name="ServicesReference" value="LDAPService"/>
And it doesn't work.
I am not in front of the portal now but I will test
<property name="ServicesReference" value="gov.justice.services"/>
But I suspect it won't work either since the service in inside gov.justice.services.ldap. Did u mean that?
And one more Q (Forgive me for laying it all on you at once...): After I've created the reference and added the external jar, how do I use it in code? I know how to do it in a DynPro Application but not in this environment...
Hey,
One more thing that it is important to my global understanding. By looking at the MastHead PAR file I see that it references many other service.
Why don't I see PortalRuntime.getRuntimeResources()... and a local jar file for each service?
My guess is that these services are somehow embedded when creating new Portal Projec, but how and which services?
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.