分页查询+hbn

使用标签 这是以 get 提交
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>

<
div  align ="center"  id ="bgee" >
    
< pg:pager  id ="pager"  
              url
='bonusdetailaction.do'
              
items ='<%=max% >
              maxPageItems='10'
                export="offset,currentPageNumber=pageNumber"  
                isOffset="false"  
                scope="request">
        
< pg:index >
            
< pg:prev > &nbsp; < href ="<%= response.encodeURL(pageUrl.replaceAll(" &", "&amp;")) % > &method =paginationEnquiries &rId = <% = request.getAttribute( " rId " %> ">[上一页] </ a ></ pg:prev >
            
< pg:pages  export ="pageUrl, pageNumber" >
                
<%
                      
if  (pageNumber  ==  currentPageNumber) {
                
%>
                    
< b > <% =  pageNumber  %> </ b >
                
<%
                      } 
else  {
                
%>
                    
< href ="<%= response.encodeURL(pageUrl.replaceAll(" &", "&amp;")) % > &method =paginationEnquiries &rId = <% = request.getAttribute( " rId " %> "> <% =  pageNumber  %> </ a >
                
<%
                      }
                   
%>
          
</ pg:pages >
             
< pg:next >< href ="<%= response.encodeURL(pageUrl.replaceAll(" &", "&amp;")) % > &method =paginationEnquiries &rId = <% = request.getAttribute( " rId " %> ">[下一页] </ a ></ pg:next >
        
</ pg:index >
    
</ pg:pager >
</ div >

action
         int  startNum  =  getParam(request,  " pageroffset " 0 );
        
int  itms  =  getParam(request,  " maxPageItems " 10 );

dao
            Query qu  =  session.createQuery(hql).setLong( " rid " , rw.getId());
            qu.setFirstResult(start);
            qu.setMaxResults(
itms );



你可能感兴趣的:(分页查询+hbn)