27 July, 2012

Pagination in Liferay 6.1

Guys if you are thinking to put pagination in liferay,
use below code which is absolutely running properly and i would be putting more information regarding pagination with some more feature which supppoted by OOB liferay pagination.




<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
<%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %>


<%@page import="javax.portlet.PortletURL"%>
<%@page import="java.util.List"%>
<%@page import="com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"%>
<%@page import="com.liferay.portlet.journal.model.JournalArticle"%>

<%
    List list= JournalArticleLocalServiceUtil.getArticles(themeDisplay.getScopeGroupId());
    
    Integer count = list.size();        
    Integer delta = (Integer)request.getAttribute("delta");        
    Integer cur = (Integer)request.getAttribute("cur");        
    if(cur == null){
        cur = 1;
    }
    if(delta == null){
        delta = 20;
    }
    if(count == null){
        count = 0;
    }
    PortletURL portletURL = renderResponse.createActionURL();
%>

Stay Tune for more information !!!

    
    
    
                    
        

        
        
    
    
    
    






Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...