Jay Patel 11 Years Ago Would like to add some points here:1. You mentioned "we need to make some entry in the portal-ext.properties, however some values are already present in portal.properties file, we have to update those properties"I think this sends out message that these properties should be added to main portal-ext.properties under [LIFERAY_HOME] or use the one with EXT, however all of these event properties can be added using any portal properties hook.2. You mentioned "Now we have to add the following classes in Ext:"This also can be avoided as use of EXT requires server restart. However these custom event classes can be added in the same hook & those classes can be mentioned/extended in the hook's portal properties file.Cheers & happy blogging Please sign in to reply. Reply as... Cancel
Apoorva Prakash 11 Years Ago Hi Jay, firstly thanks for reading.As the title of the article says, I was focusing evants customization particularly using Ext plugin. I was thinking to write a dedicated article for customisation of language properties and portal properties using hooks. As far as "addition of properties in portal-ext.properties" sentance is concerned, I suppose that those properties exist in portal.properties in portal jar, not in portal-ext.properties (which is custom made) and both are physically different files and the file portal-ext.properties is a custom file which may not include those entries. Extremely sorry for any ambiguity. Please sign in to reply. Reply as... Cancel
Apoorva Prakash 11 Years Ago Hi Jay, firstly thanks for reading.As the title of the article says, I was focusing evants customization particularly using Ext plugin. I was thinking to write a dedicated article for customisation of language properties and portal properties using hooks. As far as "addition of properties in portal-ext.properties" sentance is concerned, I suppose that those properties exist in portal.properties in portal jar, not in portal-ext.properties (which is custom made) and both are physically different files and the file portal-ext.properties is a custom file which may not include those entries. Extremely sorry for any ambiguity. Please sign in to reply. Reply as... Cancel
Apoorva Prakash 11 Years Ago Hi Jay, firstly thanks for reading.As the title of the article says, I was focusing evants customization particularly using Ext plugin. I was thinking to write a dedicated article for customisation of language properties and portal properties using hooks. As far as "addition/updation of properties in portal-ext.properties" sentance is concerned, I suppose that those properties exist in portal.properties in portal jar, not in portal-ext.properties (which is custom made) and both are physically different files and the file portal-ext.properties is a custom file which may not include those entries. Extremely sorry for any ambiguity. Please sign in to reply. Reply as... Cancel Jay Patel Apoorva Prakash 11 Years Ago No problem at all Apoorva, I got it that you wanted to explain this event customization piece in "EXT". But since EXT use is NOT preferred & the complete scenario you explained above including portal properties for event & Extended Action classes can be created in hook, the bottom line is that it should not send out wrong message to new Liferay user that this can be done only in "EXT".Cheers Please sign in to reply. Reply as... Cancel Apoorva Prakash Jay Patel 11 Years Ago Very thoughtful Jay. I'll mention this also in post. Thanks. Please sign in to reply. Reply as... Cancel Chan Shaik Apoorva Prakash 10 Years Ago Hi ApoorvaI'm trying to implement same with hook, but it's not working for me.here is my class:public class LogoutPreAction extends Action { @Override public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { System.out.println("Logout Action..................."); }}liferay-hook.xml:<hook> <portal-properties>portal.properties</portal-properties></hook>portal.properties:logout.events.post=com.liferay.examples.event.LogoutPreAction print lin statement not getting printed, all i'm seeing in logs is16:43:00,049 INFO [tomcat-http--12][PortalLogoutAction:20] Inside PortalLogoutAction...16:43:00,052 INFO [tomcat-http--12][PortalLogoutAction:38] End PortalLogoutActionPlease let me know what's missing here. Please sign in to reply. Reply as... Cancel
Jay Patel Apoorva Prakash 11 Years Ago No problem at all Apoorva, I got it that you wanted to explain this event customization piece in "EXT". But since EXT use is NOT preferred & the complete scenario you explained above including portal properties for event & Extended Action classes can be created in hook, the bottom line is that it should not send out wrong message to new Liferay user that this can be done only in "EXT".Cheers Please sign in to reply. Reply as... Cancel Apoorva Prakash Jay Patel 11 Years Ago Very thoughtful Jay. I'll mention this also in post. Thanks. Please sign in to reply. Reply as... Cancel Chan Shaik Apoorva Prakash 10 Years Ago Hi ApoorvaI'm trying to implement same with hook, but it's not working for me.here is my class:public class LogoutPreAction extends Action { @Override public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { System.out.println("Logout Action..................."); }}liferay-hook.xml:<hook> <portal-properties>portal.properties</portal-properties></hook>portal.properties:logout.events.post=com.liferay.examples.event.LogoutPreAction print lin statement not getting printed, all i'm seeing in logs is16:43:00,049 INFO [tomcat-http--12][PortalLogoutAction:20] Inside PortalLogoutAction...16:43:00,052 INFO [tomcat-http--12][PortalLogoutAction:38] End PortalLogoutActionPlease let me know what's missing here. Please sign in to reply. Reply as... Cancel
Apoorva Prakash Jay Patel 11 Years Ago Very thoughtful Jay. I'll mention this also in post. Thanks. Please sign in to reply. Reply as... Cancel Chan Shaik Apoorva Prakash 10 Years Ago Hi ApoorvaI'm trying to implement same with hook, but it's not working for me.here is my class:public class LogoutPreAction extends Action { @Override public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { System.out.println("Logout Action..................."); }}liferay-hook.xml:<hook> <portal-properties>portal.properties</portal-properties></hook>portal.properties:logout.events.post=com.liferay.examples.event.LogoutPreAction print lin statement not getting printed, all i'm seeing in logs is16:43:00,049 INFO [tomcat-http--12][PortalLogoutAction:20] Inside PortalLogoutAction...16:43:00,052 INFO [tomcat-http--12][PortalLogoutAction:38] End PortalLogoutActionPlease let me know what's missing here. Please sign in to reply. Reply as... Cancel
Chan Shaik Apoorva Prakash 10 Years Ago Hi ApoorvaI'm trying to implement same with hook, but it's not working for me.here is my class:public class LogoutPreAction extends Action { @Override public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { System.out.println("Logout Action..................."); }}liferay-hook.xml:<hook> <portal-properties>portal.properties</portal-properties></hook>portal.properties:logout.events.post=com.liferay.examples.event.LogoutPreAction print lin statement not getting printed, all i'm seeing in logs is16:43:00,049 INFO [tomcat-http--12][PortalLogoutAction:20] Inside PortalLogoutAction...16:43:00,052 INFO [tomcat-http--12][PortalLogoutAction:38] End PortalLogoutActionPlease let me know what's missing here. Please sign in to reply. Reply as... Cancel
Suresh Yadagiri 9 Years Ago I am just curious.. Yes, We can write Pre and Post actions using Hooks..And if we want to take pain we can use Ext as mentioned in this article.But can we do it using LIFERAY_HOME\portal-ext.properties and placing these Action classes in server common lib library? Can liferay load the classes and execute them? Please sign in to reply. Reply as... Cancel
Roy Cespedes 5 Years Ago Hi, Is it possible to stop the logout action in the pre-logout event? In the security area they tell me that the url "/ c / portal / logout" is insecure and the solution I am giving is to add a parameter to the url and I only have to close the session if you have that parameter. Example: / c / portal / logout? p_auth = aasdsadas. Any help to stop the logout in this event please. Please sign in to reply. Reply as... Cancel