留言板

Overriden "CreateAccountMVCActionCommand" class from 7.0.1 GA2 portla code

lokesh gorrela,修改在7 年前。

Overriden "CreateAccountMVCActionCommand" class from 7.0.1 GA2 portla code

Regular Member 帖子: 173 加入日期: 16-3-9 最近的帖子
Hi Guys,

I try to Overriden "CreateAccountMVCActionCommand" class from liferay 7.0.1 GA2 portal code through modules.After deploy i get build successful. But I did not get any change. Any one knows about my requirement please give replay.
I followed below process to overriden "CreateAccountMVCActionCommand"
1)create module project with name "create.account"
2)create a class with name "CreateAccountMVCActionCommand" in this location "/create.account/src/main/java/create/account/CreateAccountMVCActionCommand.java"

3) after that i written code like this
package create.account;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;

import org.osgi.service.component.annotations.Component;

import com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCActionCommand;

/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/


/**
* @author Brian Wing Shun Chan
* @author Amos Fong
* @author Daniel Sanz
* @author Sergio González
* @author Peter Fellwock
*/
@Component(
property = {
"javax.portlet.name=com_example_portlet_CreateAccountmvcportletPortlet",

"mvc.command.name=/login/create_account"
},
service = MVCActionCommand.class
)
public class CreateAccountMVCActionCommand extends BaseMVCActionCommand {

protected void addUser(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {

System.out.println("Enter into addUSer method");
}

@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
// TODO Auto-generated method stub

}
}
4)after that i deployed that module
5)copy and placed the jar file from this location "D:\liferayupdatedsetup7\OSGI\bundles\osgi\modules\create.account.jar" to "D:\liferayupdatedsetup7\bundles\deploy"
6)In overrdien Class , i written one S.o.p statement but it not displayed on console.I think it is not overriden.

Please tell my process is correct or not. Anybody have links or documents regarding this process please share to me.

Thanks
Regards
Lokesh