Fórumok

Liferay 6.1 : How to associate Listener in my case ??

Kiran Jai, módosítva 11 év-val korábban

Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.04.09. Legújabb bejegyzések
Hi ,

I am using Liferay 6.1 CE for Portal Application development .
I am new to Liferay , so please excuse if my question is wrong .

My query is with respect to the Listeners , I see that Liferay Listeners are limited to predefined
core portal model like journal , users --- etc . (Correct me if i am wrong)

I want to call this Listener on onAfterCreate method ( taht is after creating the User is done )

In our Aplication for creating user , we have a Seperate createUser.jsp , and on click of the submit button , it is stored in one of the Table called Virte_Users table in Database .

Please let me know , Is it possible to associate Listener in my case ?? Thanks in advance .
thumbnail
Jay Patel, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzések
Hi Kiran,

AFAIK, model listerners are for Core entities only, but still I am not able to understand following items:

1. Why you are storing users in your custom table because all other tables/entities use userId from user_ table of Liferay?

2. And if there is really need to use custom user table then I guess there is no need to have listeners as you will always have control over the logic which stores data in custom table user table, right?

3. The listeners on Core entities like User, Journal etc. were created so that changes in the Liferay core code can be minimal just in case if we want to do additional operations when changes happen to these Core entities.

-Jay.
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Jay Patel:
AFAIK, model listerners are for Core entities only


Wrong. See my other post in this thread.

1. Why you are storing users in your custom table because all other tables/entities use userId from user_ table of Liferay?


Jay is absolutely right here. You must invoke the normal Liferay processes for user management or you will totally break the functionality of the portal.

2. And if there is really need to use custom user table then I guess there is no need to have listeners as you will always have control over the logic which stores data in custom table user table, right?


Not entirely true. Listeners are invoked when the service is called by any plugin, whether it's the one you've created or some other plugin that is invoking your service classes. There are definite use cases where adding listeners to trigger activities makes sense even in your own code, i.e. your own custom auditing process or something.

3. The listeners on Core entities like User, Journal etc. were created so that changes in the Liferay core code can be minimal just in case if we want to do additional operations when changes happen to these Core entities.


Again they serve other use cases as well. The Liferay EE auditing mechanism is based on model listeners. The LDAP export is also plugged in this way, I believe. The model listeners can be used in many cases where you want to ensure some activity is invoked regardless of where the origination of the request came from (i.e. a core portlet or your own).
Kiran Jai, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.04.09. Legújabb bejegyzések
Thanks Jay .
thumbnail
Jay Patel, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzések
You're welcome Kiran, but do look the post & feedback given by David as well.

-Jay.
thumbnail
clint barbosa, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 7 Csatlakozás dátuma: 2012.08.23. Legújabb bejegyzések
I've read two of your posts with the same problem, but I still can't find the exactanswer .. And I've searched through the web . Creating model listers for core service is ok,
How to do it to a custom model / table ..

Steps for creating model listener for core models, (BlogsEntry)
- Create your class extending BaseModelListener<BlogsEntry> and implementing all necessary methods (onAfterCreate , onAfterRemove etc.....)
- define in liferay-hook.xml your portal.properties
- in portal.properties put this key and value :
value.object.listener.com.liferay.portlet.blogs.model.BlogsEntry = com.ModelListenerBlogsEntry

This is ok for model listener for BlogsEntry, how to do for custom model.. for my case I want to systemout. everytime i write into ALERT table which is using the Alert model
i found this in the persistence class "value.object.listener.com.alerts.builder.model.Alert" .. so I did the same implementation from blogsEntry in the same portal.properties as well .. I put in this :

value.object.listener.com.alerts.builder.model.Alert = com.alerts.alertutilities.ModelListenerCust ..

but I have the following error :

10:12:58,862 ERROR [HotDeployUtil:114] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for AlertsAdministration-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for AlertsAdministration-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:307)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:111)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:188)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:40)
at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:101)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.alerts.builder.service.persistence.AlertPersistence' is defined
at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:70)
at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:48)
at com.liferay.portal.deploy.hot.HookHotDeployListener.getPersistence(HookHotDeployListener.java:1169)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initModelListener(HookHotDeployListener.java:1513)
at com.liferay.portal.deploy.hot.HookHotDeployListener.initModelListeners(HookHotDeployListener.java:1544)
at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:608)
at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:304)
... 23 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.alerts.builder.service.persistence.AlertPersistence' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1075)
at com.liferay.portal.bean.BeanLocatorImpl.doLocate(BeanLocatorImpl.java:114)
at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:67)
... 29 more



Am I missing a step ? Thanks in advance for you replies
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
clint barbosa:
Am I missing a step ? Thanks in advance for you replies


You can only hook model listeners for core services.

For your own services, the listeners must be part of the project that is providing the service, as that project is the only project with the necessary beans.
thumbnail
clint barbosa, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 7 Csatlakozás dátuma: 2012.08.23. Legújabb bejegyzések
David H Nebinger:
You can only hook model listeners for core services.

For your own services, the listeners must be part of the project that is providing the service, as that project is the only project with the necessary beans.


I am trying to create a model listener for a custom entity, like the "Alert" .. and I did all these inside 1 project. so all the necessary beans are there
Richard Tichy, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 4 Csatlakozás dátuma: 2012.08.16. Legújabb bejegyzések
Hello,

I am unfortunately experiencing the same prioblem as Clint.

I am using the Liferay IDE (Eclipse Juno) with Liferay 6.1 and the latest Liferay Plugin SDK.

I first tried creating a hook in my portlet plugin project by adding an entry into portal.properties that looks like like this:

value.object.listener.path.to.my.model.MyModel=path.to,my.listener.MyModelListener

MyModel is the interface generated by ServiceBuilder for my entity, obviously...

I received a very similar error to Clint's when deploying my portlet; No bean called MyModelPersistence is defined.

I then tried adding the same portal.properties entry as described above in a hook plugin project (I copied the generated jar with all the service classes from the portlet plug-in project into the hook project) and received the same error as it was deployed to tomcat.

Could it be that we are running into this bug here?

http://issues.liferay.com/browse/LPS-18831

Not sure what else to do here as this is definitely not working as advertised ;)

Ciao,

Richard
Richard Tichy, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 4 Csatlakozás dátuma: 2012.08.16. Legújabb bejegyzések
This is definitely a bug...

http://issues.liferay.com/browse/LPS-15144

unfortunately this issue seems to have a pretty low priority...
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Your model listeners must be in the same plugin project as the persistence classes.

You cannot add a model listener outside of that project.
Richard Tichy, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 4 Csatlakozás dátuma: 2012.08.16. Legújabb bejegyzések
Actually, that was the first thing I tried (please see my first post). It was only after this failed that I tried creating a separate project just for the custom model listener hook. I added the jar containing the persistence classes needed and that failed as well.

Seems that at this time you can really only create custom listeners for "any model class in Liferay". That being a direct quote from Sezov's "Liferay In Action", for what it is worth. Seems that a custom model listener for a "custom model" created for an entity by Liferay simply does not work at this time, unless I am really missing something.
Richard Tichy, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 4 Csatlakozás dátuma: 2012.08.16. Legújabb bejegyzések
Just to be a little more specific:

It seems you cannot use a hook to create a custom model listener for a custom model created for you using ServiceBulder in a plugin project due to the bean not found exception discussed above.

If I am wrng about this I would love for someone to tell me what I am doing wrong...
thumbnail
Tanaji M. Londhe, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Regular Member Bejegyzések: 194 Csatlakozás dátuma: 2012.04.25. Legújabb bejegyzések
I have create custom listener using hook for AssetEntry
create portal.properties
add entry for listener :- value.object.listener.com.liferay.portlet.asset.model.AssetEntry=org.custom.listeners.CustomAssetEntryListener
But when i open liferay-hook.xml file hook configuration shows following error :
- Invalid portal property name name.
- value.object.listener.com.liferay.portlet.asset.model.AssetEntry" is not among possible values for name.
How to solve this issue?
Rubén Romero Montes, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 5 Csatlakozás dátuma: 2012.11.13. Legújabb bejegyzések
Richard Tichy:
Just to be a little more specific:

It seems you cannot use a hook to create a custom model listener for a custom model created for you using ServiceBulder in a plugin project due to the bean not found exception discussed above.

If I am wrng about this I would love for someone to tell me what I am doing wrong...


It's been happenning also to me and I've seen that in the deployment, if you're trying to add a listener to your.package.model.Foo, the portal looks up for the FooPersistence bean in the portal's classloader where it doesn't exist.

You can try adding your *-portal-service.jar as a plugin-ext (including the FooPersistence interface) and it won't work because you also need to declare it as a bean in the portal-spring.xml config which is done adding the file ext-spring.xml to your plugin-ext whith the your.package.service.persistence.FooPersistence bean definition pointing to the FooPersistenceImpl which also has to be in the classloader.
Something like this:
<!--?xml version="1.0" encoding="UTF-8"?-->

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" default-destroy-method="destroy" default-init-method="afterPropertiesSet" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	<bean id="your.package.service.persistence.FooPersistence" class="your.package.service.persistence.FooPersistenceImpl" parent="basePersistence" />
</beans>	


Then, as I've seen you cannot add listeners to your beans without adding the whole implementation in the portal's classloader. If I'm wrong please correct me.

Regards!
Martin Schwietzke, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 7 Csatlakozás dátuma: 2011.03.08. Legújabb bejegyzések
Hey Guys,

we found a workaround to register model listeners on other custom plugin entites in a Portlet/Hook Plugin (testet with Liferay 6.2):

The Steps are:

1. Add a Hook StartupAction
2. Register your ModelListener programmatically in this action like in the following in code snippet

This is an example to register a CalendarBooking (which is a portlet plugin entity) ModelListener:

// lookup the BasePersistence of the target plugin entity
// use the ClpSerializer instance of the target plugin entity service
BasePersistence calendarBookingPersistence = (BasePersistence) PortletBeanLocatorUtil.locate(ClpSerializer.getServletContextName(),
                "com.liferay.calendar.service.persistence.CalendarBookingPersistence");
       
ModelListener[] listeners = calendarBookingPersistence.getListeners();
// remove all old instances of our listener to avoid multiple registrations on hot deployment
for (ModelListener modelListener : listeners) {
	if (modelListener.getClass().getName().equals(CalendarBookingListener.class.getName())){
		calendarBookingPersistence.unregisterListener(modelListener);
	}
}

calendarBookingPersistence.registerListener(new MyCalendarBookingListener());


There's only one restriction because of class loading restrictions: MyCalendarBookingListener must be of generic type BaseModel (MyCalendarBookingListener<BaseModel>).
public void onBeforeCreate(BaseModel model)

Then you can get the primary key like that:
long myEntityPK =  GetterUtil.getLong(model.getPrimaryKeyObj())


Regards,
Martin

PRODYNA AG
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Martin Wiegand:
we found a workaround to register model listeners on custom entites (testet with Liferay 6.2):

The Steps are:

1. Add a Hook StartupAction
2. Register your ModelListener programmatically in this action like in the following in code snippet

This is an example to register a CalendarBooking (which is a portlet plugin entity) ModelListener


Okay, no one said that you were trying to get to the external canned plugins such as calendar.

The approved way to do this would be to follow the https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/creating-plugins-to-extend-plugins-liferay-portal-6-2-dev-guide-03-en path.

This way you start with the plugin that you're extending (i.e. the calendar plugin), but you can add your own code (i.e. the model listeners), but everything is still within the correct runtime context.
Martin Wiegand, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

New Member Bejegyzések: 7 Csatlakozás dátuma: 2011.03.08. Legújabb bejegyzések
Okay, our goal was only to use the (calendar) service and to register a model listener out of our own custom portlet. Extending the portlet was not our scope.

By the way: CalendarBooking was just an example for a "portlet plugin entity".
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Martin Wiegand:
Okay, our goal was only to use the (calendar) service and to register a model listener out of our own custom portlet. Extending the portlet was not our scope.

By the way: CalendarBooking was just an example for a "portlet plugin entity".


The link talks about extending the plugins in other ways such as replacing classes, etc. You're not really going that far, but adding a model listener to a plugin is still an extension.

I can't pick apart your implementation, though, as I'm sure you had other constraints that I'm not privy to.

But for future folks who need to do this, the "plugin extending a plugin" mechanism will be a lot easier than trying to muck around with class loaders and reflection, etc.

Just extend the other plugin, add in your liferay-hook.xml to use the portal properties file, add the properties file to define your model listener classes, and add the code for your listeners.

The upside of this mechanism is that regardless of future changes/upgrades, you won't be impacted.
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Rubén Romero Montes:
Then, as I've seen you cannot add listeners to your beans without adding the whole implementation in the portal's classloader. If I'm wrong please correct me.


Yes, you guys are all wrong.

The only place you can define listeners on your own model classes is in the plugin that implements the service. It cannot be a separate hook, it cannot be in some other plugin using the service jar, ...

The only place is in the implementation.

Liferay model listeners can be added as hooks because the runtime context for the hook is the portal's context, and therefore those model listeners are also in the plugin that implements the service (the portal).
Debopam Mitra, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 39 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
Hi David,

What you mean by adding the model listener to the service implementation? Did you mean,

public class FooModelLocalServiceImpl extends FooModelLocalServiceBaseImpl implements ModelListener<foomodel>{

......

}</foomodel>



Is this what you meant? I did but the same error is being thrown, i.e.,

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'com.edu.service.service.persistence.FooModelPersistence' is defined.

Can you please help?
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
No, it would be like any other listener implementation. You have a class which implements the ModelListener interface and register the class in the properties file. That will allow you to add a listener to a canned plugin, something you cannot do using a hook.
Debopam Mitra, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 39 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
You mean it have to be a Portlet Plugin project not a Hook Plugin project?

What you are saying I did 5 - 10 times...

What I am doing is as follows (as per my project requirement):

  • A hook plugin that hooks the JournalFolder.
  • On every folder creation I have allowed the user to add thumbnail, and other extra data fields.
  • I have create a Foo model that saves the above extra fields in the DB.
  • Now I want a model listener here to listen to the changes and update some other table in my db.


I tried the approach you suggested and all the time I get error on deployment.

Please provide any blog or link that will help me get through this problem.
Debopam Mitra, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 39 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
FINALLY, mission accomplished.

I declared the listener to my model like:

value.object.listener.com.foo.service.model.Foo=com.foo.hook.impl.FooModelListener

in my service.properties.
thumbnail
David H Nebinger, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
I think this whole thread has been polluted, so let's try and straighten it out w/ a few concepts...

1. If you want to add a model listener to a core Liferay entity, you can do this simply with a hook.

2. If you want to add a model listener to your own entities, you need to do this as a hook within the plugin offering the service (you cannot hook a model listener in another war file).

3. If you want to add a model listener to a separate war, i.e. the calendar services, you must follow the Liferay instructions for "plugin extending a plugin". Using this method, you can add a hook to the current plugin that has the model listener. So calendar, as the example, you normally cannot have a model listener for, but by extending the calendar plugin you can add a hook to it so you do the model listener.
Debopam Mitra, módosítva 9 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Junior Member Bejegyzések: 39 Csatlakozás dátuma: 2012.09.27. Legújabb bejegyzések
Yes, I wasn't hooking my custom entities in a separate plugin project. Let me point out what I did:

  • I hooked into the JournalFolder to add my features.
  • Later I wanted to added a custom entity that need to save the extra fields I have put in the JournalFolder custom jsp hook.
  • Then I needed to listen to this custom entity's CRUD operations. So thought of implementing the Model Listeners.
  • Please note that till here I have, custom jsp hook, service hook, service builder and the model listener all in the same project. And as per the given documentation and wiki I tried to do as directed.


But finally had to resort to the above process, i.e. registering the ModelListener in my service.properties.

Is it wrong for the given scenario?
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Liferay 6.1 : How to associate Listener in my case ??

Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Kiran Jai:
I see that Liferay Listeners are limited to predefined core portal model like journal , users --- etc . (Correct me if i am wrong)


You are wrong. Listeners can be added to any ServiceBuilder-based entity (it just so happens that all portal models are SB-based).

In our Aplication for creating user , we have a Seperate createUser.jsp , and on click of the submit button , it is stored in one of the Table called Virte_Users table in Database. Please let me know , Is it possible to associate Listener in my case ?? Thanks in advance .


As long as you used SB to handle your entities, you would declare a model listener for them in the exact same way you would for a core portal model.

If you did not do things the Liferay way and rolled your own persistence layer, then it is up to you to implement the listener class also.