What is PortletURLListener used for? And can I use it in a hook?

Can someone give me an example of how to use PortletURLListener ? if it can be used at all?

Like we have a ModelListener , can we also use a PortletURLListener ?

As in ModelListener , we can add functionality when creating a model, when updating a model or when deleting, etc.

  • So, we can use PortletURLListener in the same way as ModelListener . something when a specific url is called? Any other approach if not PortletURLListener ? Since the name is, I thought it might help.
  • And can we use it in the hook? or is it just used by liferei? Any other practical features that you have seen or implemented by extending or using this class?

Thanks in advance.

Thank you Note for clue :-)

+4
source share
1 answer

Used by PortletURLListener , for example. to deploy and deploy the Liferay core. See Liferay Sources for PortletHotDeployListener for more PortletHotDeployListener :

https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/com/liferay/portal/deploy/hot/PortletHotDeployListener.java

Answer after update:

You can create a binding and put servlet.service.events.post=com.my.MyAfterChangeAction on portal.properties . The MyAfterChangeAction class must implement com.liferay.portal.kernel.events.Action .

+1
source

Source: https://habr.com/ru/post/1415186/


All Articles