留言板
How to associate two Liferay service entities (e.g. an article and a poll)
Adam Victor Nazareth Brandizzi,修改在12 年前。
How to associate two Liferay service entities (e.g. an article and a poll)
Junior Member 帖子: 67 加入日期: 10-4-30 最近的帖子
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,修改在12 年前。
RE: How to associate two Liferay service entities (e.g. an article and a po (答复)
Expert 帖子: 375 加入日期: 09-3-10 最近的帖子Am 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?