Sample code for working with User Profiles on the clent side

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" session="false"%><%@taglib
uri="" prefix="portlet"%><%@taglib
uri="" prefix="portletx"%><portlet-client-model:init>
<portlet-client-model:require module="ibm.portal.xml.*" />
<portlet-client-model:require module="ibm.portal.portlet.*" />
<portlet:defineObjects />
<p>User Profile Sample</p>
_portletWindow = new ibm.portal.portlet.PortletWindow("<%=portletWindowID%>");
function handleUserProfile(portletWindow, status, userProfile){
console.log("Inside handleUserProfile");
if (status==ibm.portal.portlet.PortletWindow.STATUS_OK) {
// This is sample of how to get attributes from User Profile
console.log("Preferences.getValue()\n"+ userProfile.getAttribute("uid"));
//Follow these two steps to set attribute
userProfile.setAttribute("displayName","Sunil Patil");
else {
console.log("error loading feed");

You can download this sample from here


srjwebsolutions said...

We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.

Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida

Vikas Chaudhary said...

Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.

Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer