/** Configures the widgets that manage relation fields */
  public void setRelationFields() {

    /* field  CDT */
    cDTDataProvider = new CentreDiagTraitDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    CDT =
          new ImogSingleRelationBox<CentreDiagTraitProxy>(
              cDTDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreateCentreDiagTrait() && AccessManager.canEditCentreDiagTrait())
        CDT =
            new ImogSingleRelationBox<CentreDiagTraitProxy>(cDTDataProvider, EpicamRenderer.get());
      else
        CDT =
            new ImogSingleRelationBox<CentreDiagTraitProxy>(
                false, cDTDataProvider, EpicamRenderer.get());
    }

    /* field  lot */
    lotDataProvider = new LotDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    lot = new ImogSingleRelationBox<LotProxy>(lotDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreateLot() && AccessManager.canEditLot())
        lot = new ImogSingleRelationBox<LotProxy>(lotDataProvider, EpicamRenderer.get());
      else lot = new ImogSingleRelationBox<LotProxy>(false, lotDataProvider, EpicamRenderer.get());
    }
  }
  /** Configures the widgets that manage relation fields */
  private void setRelationFields() {

    /* field  CDT */
    cDTDataProvider = new CentreDiagTraitDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    CDT =
          new ImogSingleRelationBox<CentreDiagTraitProxy>(
              cDTDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreateCentreDiagTrait() && AccessManager.canEditCentreDiagTrait())
        CDT =
            new ImogSingleRelationBox<CentreDiagTraitProxy>(cDTDataProvider, EpicamRenderer.get());
      else
        CDT =
            new ImogSingleRelationBox<CentreDiagTraitProxy>(
                false, cDTDataProvider, EpicamRenderer.get());
    }

    /* field  laboratoireReference */
    laboratoireReferenceDataProvider = new LaboratoireReferenceDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    laboratoireReference =
          new ImogSingleRelationBox<LaboratoireReferenceProxy>(
              laboratoireReferenceDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreateLaboratoireReference()
          && AccessManager.canEditLaboratoireReference())
        laboratoireReference =
            new ImogSingleRelationBox<LaboratoireReferenceProxy>(
                laboratoireReferenceDataProvider, EpicamRenderer.get());
      else
        laboratoireReference =
            new ImogSingleRelationBox<LaboratoireReferenceProxy>(
                false, laboratoireReferenceDataProvider, EpicamRenderer.get());
    }

    /* field  casTb */
    casTbDataProvider = new CasTuberculoseDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    casTb =
          new ImogSingleRelationBox<CasTuberculoseProxy>(
              casTbDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreateCasTuberculose() && AccessManager.canEditCasTuberculose())
        casTb =
            new ImogSingleRelationBox<CasTuberculoseProxy>(casTbDataProvider, EpicamRenderer.get());
      else
        casTb =
            new ImogSingleRelationBox<CasTuberculoseProxy>(
                false, casTbDataProvider, EpicamRenderer.get());
    }
  }