code: public int getSelectedIndex() {
          Object o = $(getElement()).find("option:selected").last().prop("index");
          if (o != null) {
              return Integer.parseInt(o.toString());
          }
          return -1;
      }
docs: Gets the text for currently selected item. If multiple items are
  selected, this method will return the text of the first selected item.
  
  @return the text for selected item, or {@code null} if none is selected