cancel
Showing results for 
Search instead for 
Did you mean: 

rowsPerPageOptions event is not working in the paginator

chaituu
Champ in-the-making
Champ in-the-making
Hi,

I have included rowsPerPageOptions in the paginator template.but when I change the rowsPerpage dropdown it is not displaying records in the document library page as per the drop down selection.

       /**
          * YUI History - page
          */
         var handlePagination = function DL_handlePagination(state, me)
         {
            me.widgets.paginator.setState(state);
         YAHOO.util.History.navigate("page", String(state.page));
      
         };

         if (this.options.usePagination)
         {
            var bookmarkedPage = YAHOO.util.History.getBookmarkedState("page") || "1";
            while (bookmarkedPage !== (bookmarkedPage = decodeURIComponent(bookmarkedPage))){}
            this.currentPage = parseInt(bookmarkedPage || this.options.initialPage, 10);
         
            // Register History Manager page update callback
            YAHOO.util.History.register("page", bookmarkedPage, function DL_onHistoryManagerPageChanged(newPage)
            {
            alert("page changed")
               Alfresco.logger.debug("HistoryManager: page changed:" + newPage);
               // Update the DocList
               if (this.currentPage != newPage)
               {
                  this._updateDocList.call(this,
                  {
                     page: newPage
                  });
               }
               else
               {
                  Alfresco.logger.debug("…page changed event ignored.");
               }
            }, null, this);
         
         
            // YUI Paginator definition
            this.widgets.paginator = new YAHOO.widget.Paginator(
            {
               containers: [this.id + "-paginator", this.id + "-paginatorBottom"],
               rowsPerPage: this.options.pageSize,
               initialPage: this.currentPage,
            rowsPerPageOptions:[10,20,30,40,50,60,100],
               template: this.msg("pagination.template"),
               pageReportTemplate: this.msg("pagination.template.page-report"),
               previousPageLinkLabel: this.msg("pagination.previousPageLinkLabel"),
               nextPageLinkLabel: this.msg("pagination.nextPageLinkLabel")
            });

            this.widgets.paginator.subscribe("changeRequest", handlePagination, this);
1 REPLY 1

rcortesr
Star Contributor
Star Contributor

Where have you add the dropdown html code? in which template?

Thanks.

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.