on 11-01-2007 11:12 AM
hey everybody,
I would like to know how to access the picture of a portaluser from a PortalApplication written in java.
I already found out how to loop over the user accounts by doing:
UMFactory uf = UMFactory.getInstance();
IUserAccountFactory iuf = uf.getUserAccountFactory();
IUserAccount account = iuf.getUserAccountByLogonId(ids<i>.toString());
IUser user = account.getAssignedUser();
But I can't figure out how to get to the pictures.
Can anyone tell me how to do this?
Thanks
Greets
Wouter
Hi,
Take a look at this:
<a href="https://www.sdn.sap.com/irj/sdn/thread?messageID=1057723#1057723">https://www.sdn.sap.com/irj/sdn/thread?messageID=1057723#1057723</a>
Best Regards,
Avishai Zamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
okay,
I managed to create the url and thus see the picture of the user.
But now I want to display it in a image placeholder in htmlb.
So i creaty my url like this:
account = iuf.getUserAccountByLogonId("Student6");
IUser user = account.getAssignedUser();
uname = user.getUniqueID();
String url = http://cernum19.cernum.com:50000/irj/servlet/prt/portal/prtroot/com.sap.netweaver.kmc.people.UserPhotoRenderer?mode=normal&userid="+uname;
session.putValue("url",url);
Then I try to read it in my jsp like this:
<hbj:image
id="Logo"
tooltip="center of ebiz"
width="70"
height="35"
src="<%=componentRequest.getComponentSession().getValue("url").toString()%>"
alt="picture not found"
/>
But I get an error then...
Don't realy know what to do with this :s
Greets
Wouter
UPDATE:
It works now
Did it like this:
<% String url = componentRequest.getComponentSession().getValue("url").toString();%>
<hbj:image
id="Logo"
tooltip="center of ebiz"
width="100"
height="130"
src="<%=url%>"
alt="picture not found"
/>
Thanks
Message was edited by:
Wouter Delellio
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.