Forums de discussion

Using Ajax Push in separate projects?

German Tugores, modifié il y a 11 années.

Using Ajax Push in separate projects?

Junior Member Publications: 33 Date d'inscription: 01/03/12 Publications récentes
Hi community,

We are developing a site that has currently about 10 custom made portlets with JSF + IceFaces. We need to link comments to some of those portelts, for that purpose we created an Comments-portlet. The problem we are having is that, because we need to use Ajax Push to refresh the comments (depending on the other portlet that is linked to the comments portlet) we have to inject the CommentsBean into several other Beans from these portelts.

The problem is the portlets are in different LR projects, we tried to make the injections by creating a .jar file for the Comments portlet and putting it in the other portlets libs but this is throwing a NullPointerException. Must we have all portlets under the same LR project (same WAR file) in order to use Ajax Push or is there an alternate solution?

Thanks in advance,

Regards
Germán Tugores
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Using Ajax Push in separate projects?

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
If you want to use Ajax Push as a form of IPC, then the data has to be shared between portlets in an accessible way. The easiest way to do it is to put all the portlets in the same project, so that they appear in the same WAR. The data can be stored in PortletSession#APPLICATION_SCOPE so that the portlets share the data. That's how the icefaces3-ipc-ajax-push-portlet works.

If you need to put them in separate WAR files, then you will need to use the Enterprise Push Server from ICEsoft.
German Tugores, modifié il y a 11 années.

RE: Using Ajax Push in separate projects?

Junior Member Publications: 33 Date d'inscription: 01/03/12 Publications récentes
Hi Neil,

Thanks for clarifying that doubt.

Regards,
Germán
thumbnail
Neil Griffin, modifié il y a 11 années.

RE: Using Ajax Push in separate projects?

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
No problem Germán. Hope it all works out OK for you.