I'm trying to define a Model Listener hook using the 5.2 definition for hooks. In 5.1 you could specify your model listeners in liferay-hook.xml:
<hook>
<model-listener>
<model-listener-class>be.aca.RegistrationValueListener</model-listener-class>
<model-name>com.liferay.portlet.expando.model.ExpandoValue</model-name>
</model-listener>
</hook>
Since 5.2 you have to do it in the portal.properties. So I define my hook like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 5.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_5_2_0.dtd">
<hook>
<portal-properties>portal-ext.properties</portal-properties>
</hook>
I put a custom portal-ext.properties inside my src folder and enter:
value.object.listener.com.liferay.portlet.expando.model.ExpandoValue=be.aca.RegistrationValueListener
In my listener, I perform an action on creation of an ExpandoValue:
public class RegistrationValueListener implements ModelListener {
//...
@Override
public void onAfterCreate(BaseModel model) throws ModelListenerException {
System.out.println("BLABLA");
}
//...
}
But on form submit, nothing gets logged... What's going wrong? In 5.1 this worked perfectly.
Please sign in to flag this as inappropriate.