code: public static String htmlPageSelector(int nrPages, int itemsPage, int nrItems, int curPage, Locale locale) {
  
          StringBuffer html = new StringBuffer(256);
          for (int i = 0; i < nrPages; i++) {
              int displayedFrom = (i * itemsPage) + 1;
              int displayedTo = ((i + 1) * itemsPage) < nrItems ? (i + 1) * itemsPage : nrItems;
              html.append("\t\t\t\t<option value='");
              html.append(i + 1);
              html.append("'");
              html.append((i + 1) == curPage ? " selected" : "");
              html.append(">");
              html.append(
                  Messages.get().getBundle(locale).key(
                      Messages.GUI_LIST_PAGE_ENTRY_3,
                      new Integer(i + 1),
                      new Integer(displayedFrom),
                      new Integer(displayedTo)));
              html.append("</option>\n");
          }
          return html.toString();
      }
docs: Generates the list of html option elements for a html select control to select a page of a list.<p>
  
  @param nrPages the total number of pages
  @param itemsPage the maximum number of items per page
  @param nrItems the total number of items
  @param curPage the current page
  @param locale the locale
  
  @return html code