I can\'t get the PrimeFaces 6.1 built-in ajax feature to work when using a liferay portal. I\'ve started with the very initial use case example, that is the one shown in the
I've just sorted the problem out. There were 2 problems. The first one (the less serious one) is that the js callbacks are being invoked wrong. The right way to invoke them should be as follows:
<p:ajax process="@form" update="output" onstart="onStart()" oncomplete="onComplete()" onsuccess="onSuccess()" onerror="onError()" />
The serious problem is related to a missing parameter in the liferay-portlet.xml
config file.
Well, it maybe I should haved started saying that I was dealing with a Liferay portlet containing a JSF portlet which uses Primefaces. It all implies that liferay-portlet.xml
config file is required. And this config file has to contain the following parameter:
<requires-namespaced-parameters>false</requires-namespaced-parameters>
The problem is that the default liferay-portlet.xml
file, that is, the one that the eclipse IDE wizard creates DOES NOT automatically include such a parameter. After including such a parameter, it all works as expected.
(Down vote for Liferay people working in the Liferay Faces Bridge project).
UPDATE: The way I create the Liferay Plugin Project.
New > Project > Liferay Plugin Project
Plugin Type: portlet
Include Sample code -> unchecked
Launch New Portlet Wizard afer project is created -> checked
Next > JSF 2.x
Steps when Wizard is displayed:
Major result after those steps is that file liferay-portlet.xml
doesn't have the element:
<requires-namespaced-parameters>false</requires-namespaced-parameters>
Development settings:
Any clarification would be appreciated.