Alvaro Del Castillo 15 Anos atrás Really nice Ray! A great starting point to understand personalization. I hope some of these contents reach the developer guide. Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Alvaro Del Castillo 15 Anos atrás Thanks! Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Alvaro Del Castillo 15 Anos atrás Thanks! Por favor, autentique-se para votar. Responda como... Cancelar
Thomas Ballerstedt 15 Anos atrás I really like your [HOWTO]'s. Thank you very much! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Thomas Ballerstedt 15 Anos atrás Much appreciated! Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Thomas Ballerstedt 15 Anos atrás Much appreciated! Por favor, autentique-se para votar. Responda como... Cancelar
Hans-Georg Menz 15 Anos atrás I like this HOWTO very much, but I still have a question. Maybe you can help me with that. Do you know how to get the req in ThemeDisplay themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY);in an ICEFaces portlet? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Hans-Georg Menz 15 Anos atrás Thank you very much!I'm not a *Faces export by any means, BUT I think that in general you can do something like this:FacesContext fCtx = FacesContext.getCurrentInstance();PortletRequest req = (PortletRequest)fCtx.getExternalContext().getRequest();_themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY);Please note that a common mistake with *Faces is that "some" requests aren't actually handled by the portal. Those will never have portal attributes, like "ThemeDisplay" in them, unless you add some sort of special handling. Por favor, autentique-se para votar. Responda como... Cancelar Ruben Gerad Mathew Hans-Georg Menz 13 Anos atrás Insert the following in web.xml <context-param> <param-name>com.icesoft.faces.hiddenPortletAttributes</param-name> <param-value>THEME_DISPLAY</param-value> </context-param>Then you can access Theme Display by adding the code in your Managed Bean:avax.portlet.PortletRequest req = (javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();RenderRequest renderRequest = (RenderRequest) req.getAttribute("javax.portlet.request");ThemeDisplay _theme = (ThemeDisplay) req.getAttribute(WebKeys.THEME_DISPLAY);System.err.println(_theme.getCompany() + " : " + _theme.getCompanyId());System.out.println(_theme.getUser().getFullName() + " : " + _theme.getUserId()); Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Hans-Georg Menz 15 Anos atrás Thank you very much!I'm not a *Faces export by any means, BUT I think that in general you can do something like this:FacesContext fCtx = FacesContext.getCurrentInstance();PortletRequest req = (PortletRequest)fCtx.getExternalContext().getRequest();_themeDisplay = (ThemeDisplay)req.getAttribute(WebKeys.THEME_DISPLAY);Please note that a common mistake with *Faces is that "some" requests aren't actually handled by the portal. Those will never have portal attributes, like "ThemeDisplay" in them, unless you add some sort of special handling. Por favor, autentique-se para votar. Responda como... Cancelar
Ruben Gerad Mathew Hans-Georg Menz 13 Anos atrás Insert the following in web.xml <context-param> <param-name>com.icesoft.faces.hiddenPortletAttributes</param-name> <param-value>THEME_DISPLAY</param-value> </context-param>Then you can access Theme Display by adding the code in your Managed Bean:avax.portlet.PortletRequest req = (javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();RenderRequest renderRequest = (RenderRequest) req.getAttribute("javax.portlet.request");ThemeDisplay _theme = (ThemeDisplay) req.getAttribute(WebKeys.THEME_DISPLAY);System.err.println(_theme.getCompany() + " : " + _theme.getCompanyId());System.out.println(_theme.getUser().getFullName() + " : " + _theme.getUserId()); Por favor, autentique-se para votar. Responda como... Cancelar
aligator fred 15 Anos atrás <b>No tag "user-display" defined in tag library imported with prefix "liferay-ui"</b> error..there is no file liferay-plugin-package.properties either ? ... Por favor, autentique-se para votar. Responda como... Cancelar aligator fred aligator fred 15 Anos atrás as im the only unhappy one here im hoping its just me being a liferay anoying noob Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé aligator fred 15 Anos atrás What environment are you working with a portlet or a theme? In ext or SDK? Por favor, autentique-se para votar. Responda como... Cancelar M Murali Krishna Reddy Ray Augé 15 Anos atrás Hi Ray, I did all the settings, but I always get null for all the objects like themeDisplay and user etc. Por favor, autentique-se para votar. Responda como... Cancelar auditya manikanta vadrevu M Murali Krishna Reddy 15 Anos atrás hi murali, i have followed the steps and i have got the name and userid. specify the changes what u have done Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás Hi Ray,I am trying to get this working, but I get Given Name : null.First of all I am working with a portlet and I am using SDK 5.2.2. I am not sure where to put the <portlet-app> configurations. Is there something that is already written somewhere or shall I write it in some file, in that case, which one. If it is already written, what else can be wrong?Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Jane Eriksson 14 Anos atrás The elements under "portlet-app" go in the portlet.xml file of your plugin.See the JSP spec for relevant details about that (or the examples above). Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
aligator fred aligator fred 15 Anos atrás as im the only unhappy one here im hoping its just me being a liferay anoying noob Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé aligator fred 15 Anos atrás What environment are you working with a portlet or a theme? In ext or SDK? Por favor, autentique-se para votar. Responda como... Cancelar M Murali Krishna Reddy Ray Augé 15 Anos atrás Hi Ray, I did all the settings, but I always get null for all the objects like themeDisplay and user etc. Por favor, autentique-se para votar. Responda como... Cancelar auditya manikanta vadrevu M Murali Krishna Reddy 15 Anos atrás hi murali, i have followed the steps and i have got the name and userid. specify the changes what u have done Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás Hi Ray,I am trying to get this working, but I get Given Name : null.First of all I am working with a portlet and I am using SDK 5.2.2. I am not sure where to put the <portlet-app> configurations. Is there something that is already written somewhere or shall I write it in some file, in that case, which one. If it is already written, what else can be wrong?Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Jane Eriksson 14 Anos atrás The elements under "portlet-app" go in the portlet.xml file of your plugin.See the JSP spec for relevant details about that (or the examples above). Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé aligator fred 15 Anos atrás What environment are you working with a portlet or a theme? In ext or SDK? Por favor, autentique-se para votar. Responda como... Cancelar M Murali Krishna Reddy Ray Augé 15 Anos atrás Hi Ray, I did all the settings, but I always get null for all the objects like themeDisplay and user etc. Por favor, autentique-se para votar. Responda como... Cancelar auditya manikanta vadrevu M Murali Krishna Reddy 15 Anos atrás hi murali, i have followed the steps and i have got the name and userid. specify the changes what u have done Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás Hi Ray,I am trying to get this working, but I get Given Name : null.First of all I am working with a portlet and I am using SDK 5.2.2. I am not sure where to put the <portlet-app> configurations. Is there something that is already written somewhere or shall I write it in some file, in that case, which one. If it is already written, what else can be wrong?Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Jane Eriksson 14 Anos atrás The elements under "portlet-app" go in the portlet.xml file of your plugin.See the JSP spec for relevant details about that (or the examples above). Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
M Murali Krishna Reddy Ray Augé 15 Anos atrás Hi Ray, I did all the settings, but I always get null for all the objects like themeDisplay and user etc. Por favor, autentique-se para votar. Responda como... Cancelar auditya manikanta vadrevu M Murali Krishna Reddy 15 Anos atrás hi murali, i have followed the steps and i have got the name and userid. specify the changes what u have done Por favor, autentique-se para votar. Responda como... Cancelar
auditya manikanta vadrevu M Murali Krishna Reddy 15 Anos atrás hi murali, i have followed the steps and i have got the name and userid. specify the changes what u have done Por favor, autentique-se para votar. Responda como... Cancelar
Jane Eriksson Ray Augé 14 Anos atrás Hi Ray,I am trying to get this working, but I get Given Name : null.First of all I am working with a portlet and I am using SDK 5.2.2. I am not sure where to put the <portlet-app> configurations. Is there something that is already written somewhere or shall I write it in some file, in that case, which one. If it is already written, what else can be wrong?Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Jane Eriksson 14 Anos atrás The elements under "portlet-app" go in the portlet.xml file of your plugin.See the JSP spec for relevant details about that (or the examples above). Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Jane Eriksson 14 Anos atrás The elements under "portlet-app" go in the portlet.xml file of your plugin.See the JSP spec for relevant details about that (or the examples above). Por favor, autentique-se para votar. Responda como... Cancelar Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
Jane Eriksson Ray Augé 14 Anos atrás I did try to put it there but I still get the same answer, Given name: null.Does it matter where in the file I put it? I have tried both in the top between the <portlet-app>-tags and in the end, still between them, but nothing works. Por favor, autentique-se para votar. Responda como... Cancelar
Pierre Denis 15 Anos atrás Thanks for this post. I have a question on a topic related to personalization.When a logged user adds, positions or emove a portlet on a page of the portal, the page configuration is persisted somewhere; so the user, for his next session, will retrieve the his set of portlets, in his specific layout. For example,- user Joe has a News portlet on the left and Wheather portlet on the right;- user Sarah has a Weather portlet on top and a Map Viewer portlet on the bottom.The same applies for the specific list of pages, with chosen layout templates, configured by each user.What is exactly the name for this kind of settings (in Liferay or elsewhere)?Is this standardized (JSR-168 or JSR-286)?To be clear, my question is at the level of portal page. I DON'T speak here about- preferences/configuration of one specific portlet- Liferay themes- user profiles (name, address, etc)Thanks Por favor, autentique-se para votar. Responda como... Cancelar
Raju A K 15 Anos atrás Hi Ray,Is it possible to achieve rules based personalization or say unified user profile attributes like one available with weblogic ?ThanksRaju Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Raju A K 15 Anos atrás Do you have some references I can read on both these topics? I've never used the terminology, so I can't really comment on whether we can or can't do it. Thanks Por favor, autentique-se para votar. Responda como... Cancelar Raju A K Ray Augé 15 Anos atrás Sorry for delay.Rules based personalization: based on embedded business rules like say if A then B defined say using a drools rules engine or like web sphere which has a rules engine as part of personalization .Useful link:http://www.atgsolutionsstrategy.com/2008/09/personalization.htmlUnified user Profile is more Weblogic Portal specific which allows to create and manage unified user profiles for personalization.Heres a useful bea link:http://edocs.bea.com/wlp/docs92/users/uup.htmlDoes liferay support use of say drools rules engine just like it supports jBPM for process management .ThanksRaju Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Raju A K 15 Anos atrás Do you have some references I can read on both these topics? I've never used the terminology, so I can't really comment on whether we can or can't do it. Thanks Por favor, autentique-se para votar. Responda como... Cancelar Raju A K Ray Augé 15 Anos atrás Sorry for delay.Rules based personalization: based on embedded business rules like say if A then B defined say using a drools rules engine or like web sphere which has a rules engine as part of personalization .Useful link:http://www.atgsolutionsstrategy.com/2008/09/personalization.htmlUnified user Profile is more Weblogic Portal specific which allows to create and manage unified user profiles for personalization.Heres a useful bea link:http://edocs.bea.com/wlp/docs92/users/uup.htmlDoes liferay support use of say drools rules engine just like it supports jBPM for process management .ThanksRaju Por favor, autentique-se para votar. Responda como... Cancelar
Raju A K Ray Augé 15 Anos atrás Sorry for delay.Rules based personalization: based on embedded business rules like say if A then B defined say using a drools rules engine or like web sphere which has a rules engine as part of personalization .Useful link:http://www.atgsolutionsstrategy.com/2008/09/personalization.htmlUnified user Profile is more Weblogic Portal specific which allows to create and manage unified user profiles for personalization.Heres a useful bea link:http://edocs.bea.com/wlp/docs92/users/uup.htmlDoes liferay support use of say drools rules engine just like it supports jBPM for process management .ThanksRaju Por favor, autentique-se para votar. Responda como... Cancelar
nidhi singh 15 Anos atrás hii got good idea about personalization, but i have 1 question that, if i want to change the theme users to user how will i do? Por favor, autentique-se para votar. Responda como... Cancelar Michael Poznecki nidhi singh 15 Anos atrás How do you display any of the themeDisplay values?Michael Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Michael Poznecki 15 Anos atrás I'm not sure what you're asking! Can you explain what you are trying to do? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé nidhi singh 15 Anos atrás I'll make a quick blog post about this since I now have 2 inquires of how to do this.Coming soon! Por favor, autentique-se para votar. Responda como... Cancelar touka touka Ray Augé 12 Anos atrás Hi Raythank you for the HOWTObut i still have null when i use liferay.user.nickName !!!!Any idea for this!!! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé touka touka 12 Anos atrás How are you using that field? I don't know if that field is even defined! It should be "user.name.nickName" Por favor, autentique-se para votar. Responda como... Cancelar
Michael Poznecki nidhi singh 15 Anos atrás How do you display any of the themeDisplay values?Michael Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Michael Poznecki 15 Anos atrás I'm not sure what you're asking! Can you explain what you are trying to do? Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Michael Poznecki 15 Anos atrás I'm not sure what you're asking! Can you explain what you are trying to do? Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé nidhi singh 15 Anos atrás I'll make a quick blog post about this since I now have 2 inquires of how to do this.Coming soon! Por favor, autentique-se para votar. Responda como... Cancelar touka touka Ray Augé 12 Anos atrás Hi Raythank you for the HOWTObut i still have null when i use liferay.user.nickName !!!!Any idea for this!!! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé touka touka 12 Anos atrás How are you using that field? I don't know if that field is even defined! It should be "user.name.nickName" Por favor, autentique-se para votar. Responda como... Cancelar
touka touka Ray Augé 12 Anos atrás Hi Raythank you for the HOWTObut i still have null when i use liferay.user.nickName !!!!Any idea for this!!! Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé touka touka 12 Anos atrás How are you using that field? I don't know if that field is even defined! It should be "user.name.nickName" Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé touka touka 12 Anos atrás How are you using that field? I don't know if that field is even defined! It should be "user.name.nickName" Por favor, autentique-se para votar. Responda como... Cancelar
Aravind Kumar 14 Anos atrás Thanks for the post Ray. I would like to fetch the Liferay logged User's UserGroup Names. How can I do that? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Aravind Kumar 14 Anos atrás List<UserGroup> com.liferay.portal.service.UserGroupLocalServiceUtil.getUserUserGroups(long userId) throws SystemException; Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Aravind Kumar 14 Anos atrás List<UserGroup> com.liferay.portal.service.UserGroupLocalServiceUtil.getUserUserGroups(long userId) throws SystemException; Por favor, autentique-se para votar. Responda como... Cancelar
Jeff M. Tackett 14 Anos atrás I was trying to figure out how to get the phone number of a user. I am using the themeDisplay object and I just can't find the phone numbers. Por favor, autentique-se para votar. Responda como... Cancelar Jeff M. Tackett Jeff M. Tackett 14 Anos atrás Nevermind, I have found a way to get the phone number. Por favor, autentique-se para votar. Responda como... Cancelar
Jeff M. Tackett Jeff M. Tackett 14 Anos atrás Nevermind, I have found a way to get the phone number. Por favor, autentique-se para votar. Responda como... Cancelar
Garry Seto 14 Anos atrás Hi Ray,Very helpful post! But I am having trouble with one specific attribute, Job Title. I've followed the code exactly and all the other attributes are retrieved correctly but Job Title keeps on coming back NULL. I am using LifeRay 5.2.2. Please let me know if you've or anyone has encountered this before or if this is a known issue.Thanks,Garry Por favor, autentique-se para votar. Responda como... Cancelar
Ruben Gerad Mathew 13 Anos atrás Hi, I have a question with regard to personalization, since portlets reside on the same JVM can I use the static Util class which are also available through spring to create and remove content like shown below using my Icefaces portlets Managed Bean class:public class KeyAccess { public void invoke() { try { javax.portlet.PortletRequest req = (javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); RenderRequest renderRequest = (RenderRequest) req.getAttribute("javax.portlet.request"); ThemeDisplay _theme = (ThemeDisplay) req.getAttribute(WebKeys.THEME_DISPLAY); System.err.println(_theme.getCompany() + " : " + _theme.getCompanyId()); System.out.println(_theme.getUser().getFullName() + " : " + _theme.getUserId()); com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServiceUtil ann = new AnnouncementsEntryLocalServiceUtil(); com.liferay.portlet.messageboards.service.MBMessageLocalServiceUtil msg = new MBMessageLocalServiceUtil(); MBMessage message = msg.createMBMessage(1001); message.setBody("My Simple Message"); message.setSubject("TEST Message"); message.setCompanyId(_theme.getCompanyId()); message.setUserId(_theme.getUserId()); message.setUserName(_theme.getUser().getFullName()); message.setCategoryId(1); msg.updateMBMessage(message); // AnnouncementsEntry entry = ann.createAnnouncementsEntry(109);// Calendar cal = Calendar.getInstance();// entry.setCompanyId(_theme.getCompanyId());// entry.setUserId(_theme.getUserId());// entry.setAlert(true);// entry.setContent("adfads asdfasdf asdfsadf asdfasdf");// entry.setCreateDate(cal.getTime());// entry.setDisplayDate(cal.getTime());// ann.updateAnnouncementsEntry(entry); } catch (SystemException ex) { Logger.getLogger(KeyAccess.class.getName()).log(Level.SEVERE, null, ex); } }} Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Ruben Gerad Mathew 13 Anos atrás Not sure why you have to get the RenderRequest from the already obtained PortletRequest (should both the be the same objects), but perhaps this is a quirck with faces I'm not aware of...Otherwise try this:----------------------------------------try{ RenderRequest renderRequest = ... ThemeDisplay _theme = (ThemeDisplay)renderRequest.getAttribute( WebKeys.THEME_DISPLAY); List<ObjectValuePair<String, byte[]>> files = Collections.EMPTY_LIST; ServiceContext serviceContext = ServiceContextFactory.getInstance( MBMessage.class.getName(), renderRequest); MBMessageLocalServiceUtil.addMessage( _theme.getUserId(), _theme.getUser().getFullName(), _theme.getScopeGroupId(), MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, "TEST Message", "My Simple Message", files, false, MBThreadConstants.PRIORITY_NOT_GIVEN, true, serviceContext);}catch (SystemException ex) { ...}----------------------------------------Furthermore, there is no need to initialize the services as these are singletons that are ready for use. Just invoke their static methods.Also, use the factory add/delete/update methods from core services unless you are ABSOLUTELY sure what you are doing. Por favor, autentique-se para votar. Responda como... Cancelar Ruben Gerad Mathew Ray Augé 13 Anos atrás Thank you Ray, I really appreciate your immediate assistance. I hope I can document my full development approach soon. Por favor, autentique-se para votar. Responda como... Cancelar Kevin Jebel Ruben Gerad Mathew 13 Anos atrás Hello,Can anyone tell me how to get user attributes from a vaadin portlet please ? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Kevin Jebel 13 Anos atrás - Editado There should be no difference with Vaadin, provided you can get a handle on the underlying portletRequest/Response objects so that you can interact with the JSR-168/286 API. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Ruben Gerad Mathew 13 Anos atrás Not sure why you have to get the RenderRequest from the already obtained PortletRequest (should both the be the same objects), but perhaps this is a quirck with faces I'm not aware of...Otherwise try this:----------------------------------------try{ RenderRequest renderRequest = ... ThemeDisplay _theme = (ThemeDisplay)renderRequest.getAttribute( WebKeys.THEME_DISPLAY); List<ObjectValuePair<String, byte[]>> files = Collections.EMPTY_LIST; ServiceContext serviceContext = ServiceContextFactory.getInstance( MBMessage.class.getName(), renderRequest); MBMessageLocalServiceUtil.addMessage( _theme.getUserId(), _theme.getUser().getFullName(), _theme.getScopeGroupId(), MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, "TEST Message", "My Simple Message", files, false, MBThreadConstants.PRIORITY_NOT_GIVEN, true, serviceContext);}catch (SystemException ex) { ...}----------------------------------------Furthermore, there is no need to initialize the services as these are singletons that are ready for use. Just invoke their static methods.Also, use the factory add/delete/update methods from core services unless you are ABSOLUTELY sure what you are doing. Por favor, autentique-se para votar. Responda como... Cancelar Ruben Gerad Mathew Ray Augé 13 Anos atrás Thank you Ray, I really appreciate your immediate assistance. I hope I can document my full development approach soon. Por favor, autentique-se para votar. Responda como... Cancelar Kevin Jebel Ruben Gerad Mathew 13 Anos atrás Hello,Can anyone tell me how to get user attributes from a vaadin portlet please ? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Kevin Jebel 13 Anos atrás - Editado There should be no difference with Vaadin, provided you can get a handle on the underlying portletRequest/Response objects so that you can interact with the JSR-168/286 API. Por favor, autentique-se para votar. Responda como... Cancelar
Ruben Gerad Mathew Ray Augé 13 Anos atrás Thank you Ray, I really appreciate your immediate assistance. I hope I can document my full development approach soon. Por favor, autentique-se para votar. Responda como... Cancelar Kevin Jebel Ruben Gerad Mathew 13 Anos atrás Hello,Can anyone tell me how to get user attributes from a vaadin portlet please ? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Kevin Jebel 13 Anos atrás - Editado There should be no difference with Vaadin, provided you can get a handle on the underlying portletRequest/Response objects so that you can interact with the JSR-168/286 API. Por favor, autentique-se para votar. Responda como... Cancelar
Kevin Jebel Ruben Gerad Mathew 13 Anos atrás Hello,Can anyone tell me how to get user attributes from a vaadin portlet please ? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Kevin Jebel 13 Anos atrás - Editado There should be no difference with Vaadin, provided you can get a handle on the underlying portletRequest/Response objects so that you can interact with the JSR-168/286 API. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Kevin Jebel 13 Anos atrás - Editado There should be no difference with Vaadin, provided you can get a handle on the underlying portletRequest/Response objects so that you can interact with the JSR-168/286 API. Por favor, autentique-se para votar. Responda como... Cancelar
Mark Ricard 13 Anos atrás Very nice article. Do you know how to also get at the "custom fields" values for a particular object? I added a custom field for the Organization type but cannot seem to get the values that are at a particular object. I posted the question in the forum. Not sure if you knew. (http://www.liferay.com/community/forums/-/message_boards/message/5857914?_19_preview=false) Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Mark Ricard 13 Anos atrás Mark, I responded to the post directly. Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Mark Ricard 13 Anos atrás Mark, I responded to the post directly. Por favor, autentique-se para votar. Responda como... Cancelar
Philipp Bouillon 13 Anos atrás Thanks, but I am having trouble getting your example to work. Since I am completely new to Liferay, I am sure, my problem is an easy one, but googling didn't help.Here's what I did:Using the Eclipse Liferay IDE, I created a new Portlet. In the view.jsp, I have this code:<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %><%@ page import="javax.portlet.PortletRequest"%><%@ page import="java.util.Map"%><portlet:defineObjects /><%Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);String givenName = (userInfo != null) ? (String)userInfo.get("user.name.given") : "<empty>";String loginId = (userInfo != null) ? (String) userInfo.get("user.login.id") : "<empty>";String userPassword = PortalUtil.getUserPassword(request);%>Given Name: <%= givenName %>Login ID: <%= loginId %>Password: <%= userPassword %>After deployment, the page shows "Given Name: null, Login ID: null, Password: null", whether I am currently logged in or not. Is there anything I can do to solve this issue? What have I missed? Thanks! Por favor, autentique-se para votar. Responda como... Cancelar Philipp Bouillon Philipp Bouillon 13 Anos atrás Arrgh! Ok, sorry: portlet-app. I see. I forgot to include them. Sorry!!However, the password still is not shown, because I couldn't add that one to the portlet-app tags. How do I make the password bit available? Thanks! Por favor, autentique-se para votar. Responda como... Cancelar
Philipp Bouillon Philipp Bouillon 13 Anos atrás Arrgh! Ok, sorry: portlet-app. I see. I forgot to include them. Sorry!!However, the password still is not shown, because I couldn't add that one to the portlet-app tags. How do I make the password bit available? Thanks! Por favor, autentique-se para votar. Responda como... Cancelar
Its Me 13 Anos atrás I'm using liferay 6. I would like to get current user attributes in the controller.my methods looks like this, and i'm not using annotation (instead of renderingRequests?)@RequestMapping(params = "action=myMethod") public String myMethod(ModelMap model) throws Exception { // Here I want to get current name and save something with his/her name to the database (over a service) model.put("done", isSuccessfull); return "finished"; } Por favor, autentique-se para votar. Responda como... Cancelar Its Me Its Me 13 Anos atrás how can i do this here, to get some name of current logged in person? Por favor, autentique-se para votar. Responda como... Cancelar Its Me Its Me 13 Anos atrás Okay, not very compicated. Described as aboth. But i will give some more explicite examplego to YourController.javaI) Portlet.xmlDo as described above in main post under "Personalizaton via Portlet spec(s)"II) Controller.java1) Define----------------------------------------------------------------public class YourController.java[...]@Inject // I'm not sure if i have to inject this, but i did.protected PortletRequest portRequest; protected Map mapReq;[...]2) Code request in your method----------------------------@RequestMapping(params = "action=yourMethod")public String pushIt(ModelMap model) throws Exception { Map userInfo =(Map)portRequest.getAttribute(PortletRequest.USER_INFO); String givenName = (userInfo != null) ? (String)userInfo.get("user.name.given") : ""; model.put("getQuickMessages", countNewMessages()); return "thanx";} Por favor, autentique-se para votar. Responda como... Cancelar
Its Me Its Me 13 Anos atrás how can i do this here, to get some name of current logged in person? Por favor, autentique-se para votar. Responda como... Cancelar Its Me Its Me 13 Anos atrás Okay, not very compicated. Described as aboth. But i will give some more explicite examplego to YourController.javaI) Portlet.xmlDo as described above in main post under "Personalizaton via Portlet spec(s)"II) Controller.java1) Define----------------------------------------------------------------public class YourController.java[...]@Inject // I'm not sure if i have to inject this, but i did.protected PortletRequest portRequest; protected Map mapReq;[...]2) Code request in your method----------------------------@RequestMapping(params = "action=yourMethod")public String pushIt(ModelMap model) throws Exception { Map userInfo =(Map)portRequest.getAttribute(PortletRequest.USER_INFO); String givenName = (userInfo != null) ? (String)userInfo.get("user.name.given") : ""; model.put("getQuickMessages", countNewMessages()); return "thanx";} Por favor, autentique-se para votar. Responda como... Cancelar
Its Me Its Me 13 Anos atrás Okay, not very compicated. Described as aboth. But i will give some more explicite examplego to YourController.javaI) Portlet.xmlDo as described above in main post under "Personalizaton via Portlet spec(s)"II) Controller.java1) Define----------------------------------------------------------------public class YourController.java[...]@Inject // I'm not sure if i have to inject this, but i did.protected PortletRequest portRequest; protected Map mapReq;[...]2) Code request in your method----------------------------@RequestMapping(params = "action=yourMethod")public String pushIt(ModelMap model) throws Exception { Map userInfo =(Map)portRequest.getAttribute(PortletRequest.USER_INFO); String givenName = (userInfo != null) ? (String)userInfo.get("user.name.given") : ""; model.put("getQuickMessages", countNewMessages()); return "thanx";} Por favor, autentique-se para votar. Responda como... Cancelar
Abhay Doshi 13 Anos atrás Ray: I think I've followed your instructions to the dot. Here's my Portlet.xml --<?xml version="1.0"?><portlet-app version="2.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"> <portlet> <portlet-name>my-email</portlet-name> <display-name>My Email</display-name> <portlet-class>com.liferay.util.bridges.mvc.MVCPortlet</portlet-class> <init-param> <name>view-jsp</name> <value>/view.jsp</value> </init-param> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> </supports> <portlet-info> <title>My Email</title> <short-title>My Email</short-title> <keywords>My Email</keywords> </portlet-info> <security-role-ref> <role-name>administrator</role-name> </security-role-ref> <security-role-ref> <role-name>guest</role-name> </security-role-ref> <security-role-ref> <role-name>power-user</role-name> </security-role-ref> <security-role-ref> <role-name>user</role-name> </security-role-ref> </portlet> <user-attribute> <description>User Given Name</description> <name>user.name.given</name> </user-attribute> <user-attribute> <description>User Last Name</description> <name>user.name.family</name> </user-attribute> <user-attribute> <description>User eMail</description> <name>user.home-info.online.email</name> </user-attribute> </portlet-app>And the code snippet I am using to read the User's email :<portlet:defineObjects /><% Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO); String emailID = "init@notworking.com"; if(userInfo!=null){ emailID = (String) userInfo.get("user.home-info.online.email"); System.out.println("Email ID:"+ emailID); }I always get userInfo variable as a null Can you guide me ? Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Abhay Doshi 13 Anos atrás It took me a few minutes to see the problem myself, but once you realize that "request" is not a PortletRequest it's quite obvious. You need to get the USER_INFO from a PortletRequest, in this case it would be from the "RenderRequest" which is automatically added to the page scope by <portlet:defineObjects />.So change the line to:Map userInfo = (Map) renderRequest.getAttribute(PortletRequest.USER_INFO);and it will work. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Sir, you are awesome ! Thank you Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Abhay Doshi 13 Anos atrás Thank you! I'm glad to help. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Quick question: How can I access the user's additional email address (under profile) and custom fields ? Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Abhay Doshi 13 Anos atrás It took me a few minutes to see the problem myself, but once you realize that "request" is not a PortletRequest it's quite obvious. You need to get the USER_INFO from a PortletRequest, in this case it would be from the "RenderRequest" which is automatically added to the page scope by <portlet:defineObjects />.So change the line to:Map userInfo = (Map) renderRequest.getAttribute(PortletRequest.USER_INFO);and it will work. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Sir, you are awesome ! Thank you Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Abhay Doshi 13 Anos atrás Thank you! I'm glad to help. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Quick question: How can I access the user's additional email address (under profile) and custom fields ? Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
Abhay Doshi Ray Augé 13 Anos atrás Sir, you are awesome ! Thank you Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé Abhay Doshi 13 Anos atrás Thank you! I'm glad to help. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Quick question: How can I access the user's additional email address (under profile) and custom fields ? Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé Abhay Doshi 13 Anos atrás Thank you! I'm glad to help. Por favor, autentique-se para votar. Responda como... Cancelar Abhay Doshi Ray Augé 13 Anos atrás Quick question: How can I access the user's additional email address (under profile) and custom fields ? Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
Abhay Doshi Ray Augé 13 Anos atrás Quick question: How can I access the user's additional email address (under profile) and custom fields ? Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m Abhay Doshi 13 Anos atrás hello ray... i got dis error while runnig my jsporg.apache.jasper.JasperException: An exception occurred processing JSP page /user.jsp at line 85: 6: <portlet:defineObjects />7: <%8: Map userInfo = (Map)renderRequest.getAttribute(PortletRequest.USER_INFO);9: String emailID = "init@notworking.com";10: if(userInfo!=null){11: emailID = (String) userInfo.get("user.home-info.online.email");Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:126) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:123) com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:53) com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:196) com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilte Por favor, autentique-se para votar. Responda como... Cancelar Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
Ray Augé prabhakar m 13 Anos atrás You aren't accessing the jsp through a portlet, so it won't work. You can't arbitrarily hit a jsp in a portlet and have it work as if through the portal. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m Ray Augé 13 Anos atrás yes sir im accessing through the portal only.. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m prabhakar m 13 Anos atrás im getting error in the portlet itself. Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m Ray Augé 13 Anos atrás And the code snippet I am using to read the User's email :<portlet:defineObjects /><%Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);String emailID = "init@notworking.com";if(userInfo!=null){emailID = (String) userInfo.get("user.home-info.online.email");System.out.println("Email ID:"+ emailID);}%><%=emailID%> with this code(with out render ) im getting "init@notworking.com" if i use renderRequest... im getting apache error.. plz guide me. Por favor, autentique-se para votar. Responda como... Cancelar prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m prabhakar m 13 Anos atrás i want to dispaly the current user id who is accessing the portlet in liferay 6.0.5. ..this is my requirement.. i created a simple jsp portlet.. and installd it in to liferay portal.. help me plz Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m Ray Augé 13 Anos atrás mr.ray thanks for such a useful blog.. i hope i ll get solution here...thanks Por favor, autentique-se para votar. Responda como... Cancelar
prabhakar m Ray Augé 13 Anos atrás yes mr. ray i got user id and email... itz only show ing in view.jsp... links are not woking in dat page..but i want to get user id in my index page is it possible? because i need to save the email in to mysql database.. is it possible? Por favor, autentique-se para votar. Responda como... Cancelar