public void startCreate() {

    logger.debug("Entering startCreate() method.");

    id = null;
    selectedContatto = null;
    validoDa = null;
    validoA = null;

    // Load list of available contatti records.
    //
    ContattoService cs = ServiceFactory.createService("Contatto");
    listContattiDisponibili = cs.listDisponibiliPerContratto(dettaglioContrattoGenerale.getId());
  }
  public void startUpdate() {

    logger.debug("Entering startUpdate() method.");

    // Reloading the entity is required to be sure that the value has not changed since it was
    // read in the data table list of values.
    //
    ContrattoContattoService ccs = ServiceFactory.createService("ContrattoContatto");
    selected = ccs.retrieveDeep(selected.getId());

    id = selected.getId();

    selectedContatto = selected.getContatto();
    validoDa = selected.getValidoDa();
    validoA = selected.getValidoA();

    // Load list of available contatti records.
    //
    ContattoService cs = ServiceFactory.createService("Contatto");
    listContattiDisponibili =
        cs.listDisponibiliPerContratto(
            dettaglioContrattoGenerale.getId(), selectedContatto.getId());
  }