Fórumok

Need ajax pagination

thumbnail
Anil T, módosítva 10 év-val korábban

Need ajax pagination

Expert Bejegyzések: 313 Csatlakozás dátuma: 2012.01.14. Legújabb bejegyzések
Hi Friends,


I need ajax pagination in my custom portlet. Is there any core portlet has ajax pagination functionality ?

If anyone knows how to use ajax pagination please share code block with this thread.

Thanks,
Anil
thumbnail
meera prince, módosítva 10 év-val korábban

RE: Need ajax pagination

Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
Hi

Liferay grid not have such mechanism..

you can use jQgrid to meet your requirement..

As for my guess liferay can add or delete row in search container using AUI script.. so if we able do that one.. we can also manually add some AUI script to add or update content to grid once we get data from server through ajax

The following example jqgrid in liferay i did long back please have look it may help you...

http://www.liferaysavvy.com/2012/09/dynamic-jqgrid-with-json-data.html


http://www.liferaysavvy.com/2013/02/struts2liferay-service-builder-jqgrid.html


Regards,
Meera Prince
http://www.liferaysavvy.com
thumbnail
Anil T, módosítva 10 év-val korábban

RE: Need ajax pagination

Expert Bejegyzések: 313 Csatlakozás dátuma: 2012.01.14. Legújabb bejegyzések
Thanks meera for quick reply. I will try this one.
thumbnail
Anil T, módosítva 10 év-val korábban

RE: Need ajax pagination

Expert Bejegyzések: 313 Csatlakozás dátuma: 2012.01.14. Legújabb bejegyzések
Hi Meera,

Is there AUI ajax pagination ?

Thanks,
Anil
venkatesh jonnakuti, módosítva 10 év-val korábban

Need Migration Procedure

Junior Member Bejegyzések: 31 Csatlakozás dátuma: 2013.02.05. Legújabb bejegyzések
Hi Prince,

I have posted a thread, it is relating to Liferay upgrading From 6.0.6 to 6.1 please suggest the correct way to complete the migration procedure,

i am waiting for your replay...
please replay to this mail: venkatesh.j@tema-systems.com
its very urgent.......


thanks and regards,
venkatesh.j
thumbnail
Pankaj Kathiriya, módosítva 10 év-val korábban

RE: Need ajax pagination

Liferay Master Bejegyzések: 722 Csatlakozás dátuma: 2010.08.05. Legújabb bejegyzések
Anil T:


I need ajax pagination in my custom portlet. Is there any core portlet has ajax pagination functionality ?


Anil


In Document Library portlet, files listing has ajax pagination.

Members portlet of social-networking portlet [to be installed from Plugins Installation , non-core portlet] has ajax pagination which shows user's of current scope group.


Regards,
venkatesh jonnakuti, módosítva 10 év-val korábban

Need Migration Procedure

Junior Member Bejegyzések: 31 Csatlakozás dátuma: 2013.02.05. Legújabb bejegyzések
Hi Anil,

I have Posted a thread relating to Upgrading old version to new version of liferay. please Help me if you have the solution,

thanks and regards,
venkatesh.j
thumbnail
Dominik Marks, módosítva 10 év-val korábban

RE: Need ajax pagination

Regular Member Bejegyzések: 149 Csatlakozás dátuma: 2012.08.29. Legújabb bejegyzések
Hello Anil T,

we implemented once a liferay search container with ajax, because we wanted to show the search container within a AUI popup.

Maybe the following code excerpt may help you:

<%
    PortletURL iteratorURL = renderResponse.createRenderURL();
    iteratorURL.setWindowState(LiferayWindowState.EXCLUSIVE);
%>
<liferay-ui:search-container emptyresultsmessage="no-entries-available" delta="20" iteratorurl="<%=iteratorURL%>">
    <liferay-ui:search-container-results ... />
    <div id="<portlet:namespace/>myContainer">
                <liferay-ui:search-container-row> 
                           ...
                </liferay-ui:search-container-row> 
    </div>
</liferay-ui:search-container>

<aui:script use="aui-io-plugin">
    var myContainer= A.one('#<portlet:namespace />myContainer');
    if (myContainer) {
        var parent = myContainer.get('parentNode');

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

        myContainer.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>
thumbnail
Rahul Pande, módosítva 10 év-val korábban

RE: Need ajax pagination

Expert Bejegyzések: 310 Csatlakozás dátuma: 2010.07.07. Legújabb bejegyzések
Hi Dominik,

Perfect solution. emoticon. Thanks for posting.


Rahul Pande
Tran Du, módosítva 8 év-val korábban

RE: Need ajax pagination

New Member Bejegyzések: 7 Csatlakozás dátuma: 2015.08.24. Legújabb bejegyzések
Dominik Marks:
Hello Anil T,

we implemented once a liferay search container with ajax, because we wanted to show the search container within a AUI popup.

Maybe the following code excerpt may help you:

&lt;%
    PortletURL iteratorURL = renderResponse.createRenderURL();
    iteratorURL.setWindowState(LiferayWindowState.EXCLUSIVE);
%&gt;
<liferay-ui:search-container emptyresultsmessage="no-entries-available" delta="20" iteratorurl="<%=iteratorURL%>">
    <liferay-ui:search-container-results ... />
    <div id="<portlet:namespace/>myContainer">
                <liferay-ui:search-container-row> 
                           ...
                </liferay-ui:search-container-row> 
    </div>
</liferay-ui:search-container>

<aui:script use="aui-io-plugin">
    var myContainer= A.one('#<portlet:namespace />myContainer');
    if (myContainer) {
        var parent = myContainer.get('parentNode');

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

        myContainer.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>


I followed your solution but then search container just show the number of rows we defined in delta, it does not show the link to the next page to see the rest of the rows. What's happenning??
thumbnail
Meera Prince, módosítva 8 év-val korábban

RE: Need ajax pagination

Liferay Legend Bejegyzések: 1111 Csatlakozás dátuma: 2011.02.08. Legújabb bejegyzések
HI
you are missing one tag <liferay-ui:search-iterator/> its should be enclose by search container main tag. following is order you need to follow.


<liferay-ui:search-container>
<liferay-ui:search-container-results/>
<liferay-ui:search-container-row>
<liferay-ui:search-container-column-text/>
<liferay-ui:search-container-column-text/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator/>
</liferay-ui:search-container>

try this it may help
http://www.liferaysavvy.com/2014/05/liferay-search-container.html

Regards,
Meera Prince