/** * Sets the current page.<p> * * @param currentPage the current page to set * * @throws CmsIllegalArgumentException if the argument is invalid */ public void setCurrentPage(int currentPage) throws CmsIllegalArgumentException { if (getSize() != 0) { if ((currentPage < 1) || (currentPage > getNumberOfPages())) { throw new CmsIllegalArgumentException(Messages.get().container( Messages.ERR_LIST_INVALID_PAGE_1, new Integer(currentPage))); } } m_currentPage = currentPage; }
/** * Sets the current page.<p> * * @param currentPage the current page to set * * @throws CmsIllegalArgumentException if the argument is invalid */ public void setCurrentPage(int currentPage) throws CmsIllegalArgumentException { if (getSize() != 0) { if ((currentPage < 1) || (currentPage > getNumberOfPages())) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_LIST_INVALID_PAGE_1, new Integer(currentPage))); } } m_currentPage = currentPage; }
if (getNumberOfPages() < 2) { return ""; name = messages.key(Messages.GUI_LIST_PAGING_NEXT_NAME_0); iconPath = ICON_RIGHT; enabled = getCurrentPage() < getNumberOfPages(); helpText = messages.key(Messages.GUI_LIST_PAGING_NEXT_HELP_0); if (!enabled) { html.append( htmlPageSelector( getNumberOfPages(), getMaxItemsPerPage(), getSize(),
if (getNumberOfPages() < 2) { return ""; name = messages.key(Messages.GUI_LIST_PAGING_NEXT_NAME_0); iconPath = ICON_RIGHT; enabled = getCurrentPage() < getNumberOfPages(); helpText = messages.key(Messages.GUI_LIST_PAGING_NEXT_HELP_0); if (!enabled) { html.append("', this.value);\" style='vertical-align: bottom;'>\n"); html.append(htmlPageSelector( getNumberOfPages(), getMaxItemsPerPage(), getSize(),
/** * Sets the list state.<p> * * This may involve sorting, filtering and paging.<p> * * @param listState the state to be set */ public void setState(CmsListState listState) { if (!m_metadata.isSelfManaged()) { m_filteredItems = null; } synchronized (this) { if (m_visibleItems != null) { m_visibleItems.clear(); } } setSearchFilter(listState.getFilter()); setSortedColumn(listState.getColumn()); if (listState.getOrder() == CmsListOrderEnum.ORDER_DESCENDING) { setSortedColumn(listState.getColumn()); } if (listState.getPage() > 0) { if (listState.getPage() <= getNumberOfPages()) { setCurrentPage(listState.getPage()); } else { setCurrentPage(1); } } }
/** * Sets the list state.<p> * * This may involve sorting, filtering and paging.<p> * * @param listState the state to be set */ public void setState(CmsListState listState) { if (!m_metadata.isSelfManaged()) { m_filteredItems = null; } synchronized (this) { if (m_visibleItems != null) { m_visibleItems.clear(); } } setSearchFilter(listState.getFilter()); setSortedColumn(listState.getColumn()); if (listState.getOrder() == CmsListOrderEnum.ORDER_DESCENDING) { setSortedColumn(listState.getColumn()); } if (listState.getPage() > 0) { if (listState.getPage() <= getNumberOfPages()) { setCurrentPage(listState.getPage()); } else { setCurrentPage(1); } } }