/** Ask for a new Enregistrement. */
  public boolean askNew(Enregistrement p_template) {
    isOk = false;
    isNext = false;
    // isCheck = false;
    // wait for input
    if (p_template != null) {
      // use as the base for new enregistrement
      myJEnregistrement.update(p_template);
      if (myEnregistrement.hasParent()) {
        parentText.setText(myEnregistrement.getParent().displayData());
        myJEnregistrement.update();
      } else {
        parentText.setText("");
      }
    }

    setVisible(true);

    return (isOk | isNext);
  }
  /** Raise Dialog for selecting an parent Enregistrement. */
  protected void actionBrowse() {
    // we know it can have parent
    logger.debug("select a valid parent");

    DialogGetEnregistrement tmpDialog =
        new DialogGetEnregistrement(
            this, parentTable, (Enregistrement) myEnregistrement.getParent());
    Enregistrement selectedParent = tmpDialog.askForEnregistrement();

    // one parent selected ?
    if (selectedParent != null) {
      logger.debug("Browse : selectedParent\n" + selectedParent.toString());
      myEnregistrement.setParentRecursif(selectedParent);
    }

    if (myEnregistrement.hasParent()) {
      parentText.setText(myEnregistrement.getParent().displayData());
      myJEnregistrement.update();
    } else {
      parentText.setText("");
    }
  }