voyent
Messages posted by: jrajakumar  XML
Profile for jrajakumar -> Messages posted by jrajakumar [1]
Author Message
Get LoggedIn user from icefaces backing bean....

Code:
 String remoteUserId = (String)((Map)FacesContext.getCurrentInstance().getExternalContext().getRequestMap().get("javax.portlet.userinfo")).get("liferay.user.id");
 			User user = UserServiceUtil.getUserById(Long.parseLong(remoteUserId));
 			String userName = user.getScreenName();			
 			System.out.println("LoggedIn user: "+userName );
 

 
Profile for jrajakumar -> Messages posted by jrajakumar [1]
Go to:   
Powered by JForum 2.1.7ice © JForum Team