/** * Default Constructor.<p> * * @param list the list to read the state from */ public CmsListState(CmsHtmlList list) { m_column = list.getSortedColumn(); m_filter = list.getSearchFilter(); m_page = list.getCurrentPage(); m_order = list.getCurrentSortOrder(); }
/** * Default Constructor.<p> * * @param list the list to read the state from */ public CmsListState(CmsHtmlList list) { m_column = list.getSortedColumn(); m_filter = list.getSearchFilter(); m_page = list.getCurrentPage(); m_order = list.getCurrentSortOrder(); }
/** * Returns the number (from 1) of the last displayed item.<p> * * @return the number (from 1) of the last displayed item, or zero if the list is empty */ protected int displayedTo() { if (getSize() != 0) { if (!isPrintable()) { if (getCurrentPage() * getMaxItemsPerPage() < getSize()) { return getCurrentPage() * getMaxItemsPerPage(); } } } return getSize(); }
/** * Returns the number (from 1) of the first displayed item.<p> * * @return the number (from 1) of the first displayed item, or zero if the list is empty */ protected int displayedFrom() { if (getSize() != 0) { if (isPrintable()) { return 1; } else { return (getCurrentPage() - 1) * getMaxItemsPerPage() + 1; } } return 0; }
/** * Returns the number (from 1) of the first displayed item.<p> * * @return the number (from 1) of the first displayed item, or zero if the list is empty */ protected int displayedFrom() { if (getSize() != 0) { if (isPrintable()) { return 1; } else { return ((getCurrentPage() - 1) * getMaxItemsPerPage()) + 1; } } return 0; }
/** * Returns the number (from 1) of the last displayed item.<p> * * @return the number (from 1) of the last displayed item, or zero if the list is empty */ protected int displayedTo() { if (getSize() != 0) { if (!isPrintable()) { if ((getCurrentPage() * getMaxItemsPerPage()) < getSize()) { return getCurrentPage() * getMaxItemsPerPage(); } } } return getSize(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeSelectPage() */ @Override protected void executeSelectPage() { super.executeSelectPage(); getSettings().setExplorerPage(getList().getCurrentPage()); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeSelectPage() */ @Override protected void executeSelectPage() { super.executeSelectPage(); getSettings().setExplorerPage(getList().getCurrentPage()); }
String name = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_NAME_0); String iconPath = ICON_LEFT; boolean enabled = getCurrentPage() > 1; String helpText = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_HELP_0); if (!enabled) { helpText = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_HELPDIS_0); String onClic = "listSetPage('" + getId() + "', " + (getCurrentPage() - 1) + ")"; html.append(A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, 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) { helpText = messages.key(Messages.GUI_LIST_PAGING_NEXT_HELPDIS_0); onClic = "listSetPage('" + getId() + "', " + (getCurrentPage() + 1) + ")"; html.append(A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, getMaxItemsPerPage(), getSize(), getCurrentPage(), getWp().getLocale())); html.append("\t\t\t</select>\n");
String name = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_NAME_0); String iconPath = ICON_LEFT; boolean enabled = getCurrentPage() > 1; String helpText = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_HELP_0); if (!enabled) { helpText = messages.key(Messages.GUI_LIST_PAGING_PREVIOUS_HELPDIS_0); String onClic = "listSetPage('" + getId() + "', " + (getCurrentPage() - 1) + ")"; html.append(A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, 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) { helpText = messages.key(Messages.GUI_LIST_PAGING_NEXT_HELPDIS_0); onClic = "listSetPage('" + getId() + "', " + (getCurrentPage() + 1) + ")"; html.append(A_CmsHtmlIconButton.defaultButtonHtml( CmsHtmlIconButtonStyleEnum.SMALL_ICON_TEXT, getMaxItemsPerPage(), getSize(), getCurrentPage(), getWp().getLocale())); html.append("\t\t\t</select>\n");