Message Boards
Override Liferay Login Action /login/login not working
Sandip Patel, modified 6 Years ago.
Override Liferay Login Action /login/login not working
Regular Member Posts: 205 Join Date: 1/5/11 Recent Posts
Hi,
I want to override Liferay OOTB Login portlet Action command /login/login in Liferay 7 CE GA 5. I have created one activator module and create one custom Login class as below.
Here 1850 service rank I got form my gogo shell with following below link.
http://www.liferayrevisited.com/2016/09/how-to-hook-liferay-action-command-in.html
http://findnerd.com/list/view/Override-Portlet-MVC-Action-Command-in-Liferay-7/25532/
I have deploy my custom module and still I am not able to execute custom login class action method??
Any thing I am missing ? Please help me..
Regards,
Sandip Patel
I want to override Liferay OOTB Login portlet Action command /login/login in Liferay 7 CE GA 5. I have created one activator module and create one custom Login class as below.
@Component(immediate = true, property = {
"javax.portlet.name=com_liferay_login_web_portlet_FastLoginPortlet",
"javax.portlet.name=com_liferay_login_web_portlet_LoginPortlet",
"mvc.command.name=/login/login",
"service.rank=1850" }, service = MVCActionCommand.class)
public class CustomLogInActionCommand extends BaseMVCActionCommand{
@Reference(target = "(&(mvc.command.name=/login/login)(javax.portlet.name=com_liferay_login_web_portlet_FastLoginPortlet) "
+ "(javax.portlet.name=com_liferay_login_web_portlet_LoginPortlet)(component.name=login.action.module.actioncommand.CustomLogInActionCommand))")
public void setMvcActionCommand(MVCActionCommand mvcActionCommand) {
this.mvcActionCommand = mvcActionCommand;
}
public MVCActionCommand getMvcActionCommand() {
return this.mvcActionCommand;
}
protected MVCActionCommand mvcActionCommand;
@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
System.out.println(" Custom Login Action");
mvcActionCommand.processAction(actionRequest, actionResponse);
}
@Override
public boolean processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException {
System.out.println("Custom Login Action");
return super.processAction(actionRequest, actionResponse);
}
}
Here 1850 service rank I got form my gogo shell with following below link.
http://www.liferayrevisited.com/2016/09/how-to-hook-liferay-action-command-in.html
http://findnerd.com/list/view/Override-Portlet-MVC-Action-Command-in-Liferay-7/25532/
I have deploy my custom module and still I am not able to execute custom login class action method??
Any thing I am missing ? Please help me..
Regards,
Sandip Patel
James Ovcarik, modified 3 Years ago.
RE: Override Liferay Login Action /login/login not working
New Member Posts: 6 Join Date: 7/13/11 Recent Posts
Hello Sandip, I am also having the same experience using CE 7.3.4 GA5 . Did you ever find any resolution? I have been trying many things and reading many examples, but nothing seems to trigger the custom action. I will continue to research and will post any findings if I get a resolution.
James
James
James Ovcarik, modified 3 Years ago.
RE: Override Liferay Login Action /login/login not working
New Member Posts: 6 Join Date: 7/13/11 Recent Posts
@Component(
immediate = true,
property = {
"javax.portlet.name=com_liferay_login_web_portlet_FastLoginPortlet",
"javax.portlet.name=com_liferay_login_web_portlet_LoginPortlet",
"javax.portlet.name="+MyLoginPortletKeys.MYLOGIN,
"mvc.command.name=/login/login",
"service.rank=1000000000"
},
service = MVCActionCommand.class
)
immediate = true,
property = {
"javax.portlet.name=com_liferay_login_web_portlet_FastLoginPortlet",
"javax.portlet.name=com_liferay_login_web_portlet_LoginPortlet",
"javax.portlet.name="+MyLoginPortletKeys.MYLOGIN,
"mvc.command.name=/login/login",
"service.rank=1000000000"
},
service = MVCActionCommand.class
)