• Pre Login and Post Login Action In Liferay 7 DXP

    Pre Login and Post Login Action In Liferay 7 DXP

    In order to create a Pre Login Action in liferay, create an Activator Module Project with the Project Template of "activator", after creating the Module Right Click on the module to create a component class as shown in the below image.




    Select the "Login Pre Action" component class template and give a component class name as shown in the image.



    After creating the component you will be able to see the LoginPreAction Class.



    Post Login Action
    For Post Login Action the property key will be "key=login.events.post"



    buil.gradle

    dependencies { compileOnly group: "org.osgi", name: "org.osgi.core", version: "6.0.0" compile group: "org.osgi", name:"org.osgi.service.component.annotations", version:"1.3.0" compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0" compileOnly group: "javax.servlet", name: "javax.servlet-api", version: "3.0.1" compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0" compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0" compileOnly group: "jstl", name: "jstl", version: "1.2" compileOnly group: "org.osgi", name: "osgi.cmpn", version: "6.0.0" }

    Source Code


  • 2 comments: