code: private int getSelectedTab() {
          String theme = "default";
          List<PageParameters.NamedPair> pairs = getPageParameters().getAllNamed();
          theme = pairs.get(0).getValue();
          if ("grid".equals(theme)) {
              return 1;
          } else if ("skies".equals(theme)) {
              return 2;
          } else if ("gray".equals(theme)) {
              return 3;
          } else if ("darkblue".equals(theme)) {
              return 4;
          } else if ("darkgreen".equals(theme)) {
              return 5;
          } else {
              return 0;
          }
      }
docs: Used in the renderHead method to highlight the currently
  selected theme tab
  @return the index of the currently selected theme tab