Ahmed Hasan 8 Years Ago Very impressive magic and happy that you really made it work. We did the similar thing using an Ext plugin for one of our major implementations. But this looks much simpler and trendier. Also had a look into the site that you have mentioned. You guys have done a great job. Keep up the good work and keep sharing the knowledge with rest of the community members. Thanks. Ahamed HasanAuthor, Liferay Cookbook Please sign in to reply. Reply as... Cancel Lauri Hiltunen Ahmed Hasan 8 Years Ago Thank you Ahmed! RequestWrappers are a powerful concept in Liferay as well, it would be interesting to know how people have used them in their own projects. Please sign in to reply. Reply as... Cancel
Lauri Hiltunen Ahmed Hasan 8 Years Ago Thank you Ahmed! RequestWrappers are a powerful concept in Liferay as well, it would be interesting to know how people have used them in their own projects. Please sign in to reply. Reply as... Cancel
Manish Jha 8 Years Ago The BaseStrutsPortletAction does not have getParameter() method. Where to get getParameter() method in the hook ? Please sign in to reply. Reply as... Cancel Lauri Hiltunen Manish Jha 8 Years Ago - Edited Sorry Manish, I realised that my screenshots missed one crucial part. In your custom StrutsPortletAction, you have to create a request wrapper object which extends ActionRequestWrapper. It's the getParameter-method in this wrapper class you need to override. So in your StrutsPortletAction you just do something like this: originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig, new LoginParamWrapper(actionRequest), actionResponse); Please sign in to reply. Reply as... Cancel Manish Jha Lauri Hiltunen 8 Years Ago could you suggest where to look for LoginNameResolver and LoginParamKeys class. I could not find in Liferay 6.2.Are they custom classes ? Please sign in to reply. Reply as... Cancel Lauri Hiltunen Manish Jha 8 Years Ago Yes Manish, the LoginNameResolver is a custom class which basically translates the email address used to screen name (or vice versa). This is done simply by fetching the user with the said screen name or email and returning the requested attribute. LoginParamKeys is also a custom class, it was created just to avoid using the String "login" inline in the LoginParamWrapper. Please sign in to reply. Reply as... Cancel
Lauri Hiltunen Manish Jha 8 Years Ago - Edited Sorry Manish, I realised that my screenshots missed one crucial part. In your custom StrutsPortletAction, you have to create a request wrapper object which extends ActionRequestWrapper. It's the getParameter-method in this wrapper class you need to override. So in your StrutsPortletAction you just do something like this: originalStrutsPortletAction.processAction(originalStrutsPortletAction, portletConfig, new LoginParamWrapper(actionRequest), actionResponse); Please sign in to reply. Reply as... Cancel Manish Jha Lauri Hiltunen 8 Years Ago could you suggest where to look for LoginNameResolver and LoginParamKeys class. I could not find in Liferay 6.2.Are they custom classes ? Please sign in to reply. Reply as... Cancel Lauri Hiltunen Manish Jha 8 Years Ago Yes Manish, the LoginNameResolver is a custom class which basically translates the email address used to screen name (or vice versa). This is done simply by fetching the user with the said screen name or email and returning the requested attribute. LoginParamKeys is also a custom class, it was created just to avoid using the String "login" inline in the LoginParamWrapper. Please sign in to reply. Reply as... Cancel
Manish Jha Lauri Hiltunen 8 Years Ago could you suggest where to look for LoginNameResolver and LoginParamKeys class. I could not find in Liferay 6.2.Are they custom classes ? Please sign in to reply. Reply as... Cancel Lauri Hiltunen Manish Jha 8 Years Ago Yes Manish, the LoginNameResolver is a custom class which basically translates the email address used to screen name (or vice versa). This is done simply by fetching the user with the said screen name or email and returning the requested attribute. LoginParamKeys is also a custom class, it was created just to avoid using the String "login" inline in the LoginParamWrapper. Please sign in to reply. Reply as... Cancel
Lauri Hiltunen Manish Jha 8 Years Ago Yes Manish, the LoginNameResolver is a custom class which basically translates the email address used to screen name (or vice versa). This is done simply by fetching the user with the said screen name or email and returning the requested attribute. LoginParamKeys is also a custom class, it was created just to avoid using the String "login" inline in the LoginParamWrapper. Please sign in to reply. Reply as... Cancel
Ramesh Yelda 8 Years Ago Thanks for the article, I have been searching for the above scenario, Luckily I got this link. could u please elaborate on below , new LoginParamWrapper(actionRequest),LoginNameResolver and LoginParamKeys .when I put new LoginParamWrapper(actionRequest) in struct actions as mentioned u i'm getting error.And plz tell me how to use LoginNameResolver and LoginParamKeys, because i'm new to these struct actions . It making some confusion.Please help. Please sign in to reply. Reply as... Cancel Lauri Hiltunen Ramesh Yelda 8 Years Ago Hello Ramu. You’ll need to create a LoginParamWrapper class, which extends ActionRequestWrapper. Then in the class defined as the struts-action-impl, you’ll just wrap the original actionRequest with it. What is the error you’re getting? LoginNameResolver is a custom (dummy) class which does nothing but hides the logic of resolving the needed login name from email or screen name. The LoginParamKeys is just a class containing the static parameter names used while logging in, the string “login” for instance. Please sign in to reply. Reply as... Cancel
Lauri Hiltunen Ramesh Yelda 8 Years Ago Hello Ramu. You’ll need to create a LoginParamWrapper class, which extends ActionRequestWrapper. Then in the class defined as the struts-action-impl, you’ll just wrap the original actionRequest with it. What is the error you’re getting? LoginNameResolver is a custom (dummy) class which does nothing but hides the logic of resolving the needed login name from email or screen name. The LoginParamKeys is just a class containing the static parameter names used while logging in, the string “login” for instance. Please sign in to reply. Reply as... Cancel
Ramesh Yelda 8 Years Ago Thanks for the quick reply LaurI resolved the problem by seeing the comments of urs, thanks a lot for the article, it saved a lot of time.Excellent article... Please sign in to reply. Reply as... Cancel