Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
German Tugores
Using Ajax Push in separate projects?
June 27, 2012 7:08 AM
Answer

German Tugores

Rank: Junior Member

Posts: 33

Join Date: March 1, 2012

Recent Posts

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
Neil Griffin
RE: Using Ajax Push in separate projects?
June 27, 2012 7:43 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2378

Join Date: July 26, 2005

Recent Posts

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
RE: Using Ajax Push in separate projects?
June 27, 2012 8:02 AM
Answer

German Tugores

Rank: Junior Member

Posts: 33

Join Date: March 1, 2012

Recent Posts

Hi Neil,

Thanks for clarifying that doubt.

Regards,
Germán
Neil Griffin
RE: Using Ajax Push in separate projects?
June 27, 2012 10:41 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2378

Join Date: July 26, 2005

Recent Posts

No problem Germán. Hope it all works out OK for you.