Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Adam Victor Nazareth Brandizzi
How to associate two Liferay service entities (e.g. an article and a poll)
9 de Setembro de 2011 13:10
Resposta

Adam Victor Nazareth Brandizzi

Ranking: Junior Member

Mensagens: 67

Data de entrada: 30 de Abril de 2010

Mensagens 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:
  1. 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
  2. Create a hook to change the Poll registration form, adding a field to select a journal article when creating the poll
  3. 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
RE: How to associate two Liferay service entities (e.g. an article and a po
10 de Setembro de 2011 01:54
Resposta

Bijan Vakili

Ranking: Regular Member

Mensagens: 141

Data de entrada: 10 de Março de 2009

Mensagens recentes

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?