public void clearDetails() {
   int selectedTab = getSelectedTabNumber();
   if (selectedTab == 0) {
     // view tab : show empty message
     userViewer.setData((Record[]) null);
   } else if (selectedTab == 1) {
     // edit tab : show new record editor, or empty message
     updateTab(1, editorLabel);
   } else {
     updateTab(2, insertLabel);
   }
 }
  public void updateDetails() {
    Record selectedRecord = userListGrid.getSelectedRecord();

    if (selectedRecord == null) {
      return;
    }

    int selectedTab = getSelectedTabNumber();
    if (selectedTab == 0) {
      // view tab : show empty message
      userViewer.setData(new Record[] {selectedRecord});
    } else if (selectedTab == 1) {
      // edit tab : show record editor
      editorForm.editRecord(selectedRecord);
    } else {
      // insertForm.clearValues();
    }
  }
  @Override
  protected Canvas getCellHoverComponent(Record record, Integer rowNum, Integer colNum) {
    // only show a custom DetailViewer for the description column only
    if (colNum == 1) {

      DetailViewer detailViewer = new DetailViewer();
      detailViewer.setWidth(400);

      // Define the fields that we want to display in the details popup.
      // These
      // fields are populated from the record of the selected ValueSets.
      DetailViewerField descripitonField = new DetailViewerField("value", "Description");
      DetailViewerField formalNameField = new DetailViewerField("formalName", "Formal Name");
      detailViewer.setFields(formalNameField, descripitonField);

      detailViewer.setData(new Record[] {record});
      return detailViewer;
    }
    return null;
  }