Commit 3046d0cc authored by Elias Englmeier's avatar Elias Englmeier
Browse files

added override for the create account action command

parent f3923f7f
.gradle/
build/
target/
\ No newline at end of file
Bundle-Name: JSPOverrides
Bundle-SymbolicName: JSPOverrides
Bundle-Version: 1.0.0
Export-Package: JSPOverrides.constants
\ No newline at end of file
dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0"
}
package JSPOverrides.constants;
/**
* @author englmeier
*/
public class JSPOverridesPortletKeys {
public static final String JSPOverrides = "JSPOverrides";
}
\ No newline at end of file
package JSPOverrides.portlet;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCActionCommand;
@Component(
property = {
"javax.portlet.name = com_liferay_login_web_portlet_FastLoginPortlet",
"javax.portlet.name = com_liferay_login_web_portlet_LoginPortlet",
"mvc.command.name=/login/create_account",
"service.ranking:Integer=100"
},
service = MVCActionCommand.class)
public class CustomCreateAccountMVCActionCommand extends BaseMVCActionCommand{
@Override
protected void doProcessAction(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>> OVERRIDE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
mvcActionCommand.processAction(actionRequest, actionResponse);
}
@Reference(
target = "(component.name=com.liferay.login.web.internal.portlet.action.CreateAccountMVCActionCommand)")
protected MVCActionCommand mvcActionCommand;
}
package JSPOverrides.portlet;
import JSPOverrides.constants.JSPOverridesPortletKeys;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet;
import javax.portlet.Portlet;
import org.osgi.service.component.annotations.Component;
/**
* @author englmeier
*/
@Component(
immediate = true,
property = {
"com.liferay.portlet.display-category=category.een",
"com.liferay.portlet.instanceable=false",
"javax.portlet.display-name=JSPOverrides Portlet",
"javax.portlet.init-param.template-path=/",
"javax.portlet.init-param.view-template=/view.jsp",
"javax.portlet.name=" + JSPOverridesPortletKeys.JSPOverrides,
"javax.portlet.resource-bundle=content.Language",
"javax.portlet.security-role-ref=power-user,user"
},
service = Portlet.class
)
public class JSPOverridesPortlet extends MVCPortlet {
}
\ No newline at end of file
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %><%@
taglib uri="http://liferay.com/tld/portlet" prefix="liferay-portlet" %><%@
taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %><%@
taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>
<liferay-theme:defineObjects />
<portlet:defineObjects />
\ No newline at end of file
<%@ include file="/init.jsp" %>
<p>
<b><liferay-ui:message key="JSPOverrides.caption"/></b>
</p>
\ No newline at end of file
javax.portlet.display-name.JSPOverrides=JSPOverrides JSP
javax.portlet.keywords.JSPOverrides=JSPOverrides,jsp
javax.portlet.short-title.JSPOverrides=JSPOverrides JSP
javax.portlet.title.JSPOverrides=JSPOverrides JSP Portlet
JSPOverrides.caption=Hello from JSPOverrides JSP!
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment