@Override
 public void expandRow(final String rowPosition) {
   ViewNavigator nav = getNewNavigator();
   nav.gotoPos(rowPosition, '.');
   ViewEntry current = nav.getCurrent();
   int noteId = new BigInteger(current.getNoteID(), 16).intValue();
   collapsedIds_.remove(noteId);
   expandedIds_.add(noteId);
   clearCache();
 }
  protected ViewNavigator getNewNavigator() {
    View view = getView();
    ViewNavigator nav = null;
    if (category_ == null) {
      nav = view.createViewNav();
    } else {
      nav = view.createViewNavFromCategory(category_);
    }
    nav.setBufferMaxEntries(50); // The most common use will likely be a paged view

    int[] expandedIds = new int[expandedIds_.size()];
    int i = 0;
    for (Integer id : expandedIds_) {
      expandedIds[i++] = id;
    }
    int[] collapsedIds = new int[collapsedIds_.size()];
    i = 0;
    for (Integer id : collapsedIds_) {
      collapsedIds[i++] = id;
    }
    nav.setAutoExpandGuidance(50, collapsedIds, expandedIds);

    return nav;
  }
 @Override
 public boolean isRowCollapsed() {
   return collapsedIds_.contains(get(getRowIndex()).noteId());
 }