Fórum
How to associate two Liferay service entities (e.g. an article and a poll)
Adam Victor Nazareth Brandizzi, modificado 12 Anos atrás.
How to associate two Liferay service entities (e.g. an article and a poll)
Junior Member Postagens: 67 Data de Entrada: 30/04/10 Postagens Recentes
Hello, all!
We want to associate journal articles to polls in such a way that we can automatically provide a link to an article when showing a poll. For that, we intend to follow the following steps:
If we were using Liferay 6 SP2 or later we could do all of it with a hook, since hooks can update struts actions in these versions. Since we do use Liferay 6 SP1 and cannot migrate for a newer version for now, we wonder how to get what we need. Apparently, the best solution is an extlet or to create a hook and an associated patch jar, but these seem to be hard solutions to a simple problem.
Am I right? Is there an easier way to solve this problem? How would you all associate two service entities in Liferay?
Thanks in advance!
We want to associate journal articles to polls in such a way that we can automatically provide a link to an article when showing a poll. For that, we intend to follow the following steps:
- Create a new service with service builder, whose the sole entity will have two foreign keys pointing to both the journal article and the poll
- Create a hook to change the Poll registration form, adding a field to select a journal article when creating the poll
- Change the poll creation action so it can save the relationship entity associating the poll to the journal article
If we were using Liferay 6 SP2 or later we could do all of it with a hook, since hooks can update struts actions in these versions. Since we do use Liferay 6 SP1 and cannot migrate for a newer version for now, we wonder how to get what we need. Apparently, the best solution is an extlet or to create a hook and an associated patch jar, but these seem to be hard solutions to a simple problem.
Am I right? Is there an easier way to solve this problem? How would you all associate two service entities in Liferay?
Thanks in advance!
Bijan Vakili, modificado 12 Anos atrás.
RE: How to associate two Liferay service entities (e.g. an article and a po (Resposta)
Expert Postagens: 375 Data de Entrada: 10/03/09 Postagens RecentesAm I right?
Yes
Is there an easier way to solve this problem? How would you all associate two service entities in Liferay?
Not that I know of - this seems easy enough, no?