Foros de discusión

Want search container pagination throught ajax with liferay 5.2.3

Abdulbasit Shaikh, modificado hace 9 años.

Want search container pagination throught ajax with liferay 5.2.3

New Member Mensajes: 18 Fecha de incorporación: 16/05/13 Mensajes recientes
Hi,

I have implemented search container in popup in liferay. Now problem I am facing here is when my popup loads first time so items are showing correctly in popup for the first page. When I click next, items are showing but my popup get closed as liferay does the rendering. So I searched on google and found that using ajax, you can prevent page refresh. I also found the code for the same. Please find the code snippt as follows:

<aui:script use="aui-io-plugin">
var searchUsers = A.one('#<portlet:namespace />searchUsers');

if (searchUsers) {
var parent = searchUsers.get('parentNode');
console.log(parent);

parent.plug(
A.Plugin.IO,
{
autoLoad: false
}
);

searchUsers.all('a').on(
'click',
function(event) {
var uri = event.currentTarget.get('href').replace(/p_p_state=normal/i, 'p_p_state=exclusive');

parent.io.set('uri', uri);
parent.io.start();

event.preventDefault();
}
);
}
</aui:script>

But this code uses aui tag and I am using liferay 5.2.3 which doesn't support aui. So can anyone please let me know how I can achieve this functionality?

Any help will be appreciated.

Thanks and Regards,
Abdulbasit F Shaikh.