コード例 #1
0
  /** Configures the widgets that manage relation fields */
  private void setRelationFields() {

    /* field  patient */
    patientDataProvider = new PatientDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    patient =
          new ImogSingleRelationBox<PatientProxy>(patientDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreatePatient() && AccessManager.canEditPatient())
        patient =
            new ImogSingleRelationBox<PatientProxy>(patientDataProvider, EpicamRenderer.get());
      else
        patient =
            new ImogSingleRelationBox<PatientProxy>(
                false, patientDataProvider, EpicamRenderer.get());
    }

    /* field  patientLie */
    patientLieDataProvider = new PatientDataProvider(requestFactory);
    if (hideButtons) // in popup, relation buttons hidden
    patientLie =
          new ImogSingleRelationBox<PatientProxy>(
              patientLieDataProvider, EpicamRenderer.get(), true);
    else { // in wrapper panel, relation buttons enabled
      if (AccessManager.canCreatePatient() && AccessManager.canEditPatient())
        patientLie =
            new ImogSingleRelationBox<PatientProxy>(patientLieDataProvider, EpicamRenderer.get());
      else
        patientLie =
            new ImogSingleRelationBox<PatientProxy>(
                false, patientLieDataProvider, EpicamRenderer.get());
    }
  }
コード例 #2
0
  /**
   * Constructor
   *
   * @param requestFactory
   * @param searchText text that will be used to filter the table entries
   */
  public CasIndexListPanel(EpicamRequestFactory requestFactory, String searchText) {

    this.requestFactory = requestFactory;
    imogResources = GWT.create(ImogResources.class);
    imogResources.imogStyle().ensureInjected();

    /* wrapper panel */
    wrapperPanel = new WrapperPanelForTable();
    wrapperPanel.setTitle(NLS.constants().casIndex_table_text());
    if (EpicamIconConstants.CASINDEX_ICON != null)
      wrapperPanel.setIcon(EpicamIconConstants.CASINDEX_ICON);

    /* data provider */
    CasIndexDataProvider provider = new CasIndexDataProvider(requestFactory);
    String filteringMessage = configureDataProvider(provider, searchText);
    if (filteringMessage != null) wrapperPanel.setMessageLabel(filteringMessage);

    /* dynatable */
    if (AccessManager.canDeleteCasIndex() && AccessManager.canEditCasIndex())
      listComposite = new CasIndexDynaTable(requestFactory, provider, true);
    else listComposite = new CasIndexDynaTable(requestFactory, provider, false);

    configureWrapperPanelForTable();
    initWidget(uiBinder.createAndBindUi(this));
  }
コード例 #3
0
  /** 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());
    }
  }
コード例 #4
0
  /** Configures the visibility of the fields in edit mode depending on the user privileges */
  public void setFieldEditAccess() {

    if (!AccessManager.canEditSortieLotDescription()) CDT.setVisible(false);

    if (!AccessManager.canEditSortieLotDescription()) lot.setVisible(false);

    if (!AccessManager.canEditSortieLotDescription()) quantite.setVisible(false);
  }
コード例 #5
0
  /** Configures the visibility of the fields in edit mode depending on the user privileges */
  private void setFieldEditAccess() {

    /* CentreExamen section widgets visibility */
    if (!AccessManager.canEditExamenMicroscopieCentreExamen())
      centreExamenSection.setVisible(false);

    /* Examen section widgets visibility */
    if (!AccessManager.canEditExamenMicroscopieExamen()) examenSection.setVisible(false);
  }
コード例 #6
0
  /**
   * Display the current instance of LieuDit in editor
   *
   * @param entity the LieuDitProxy to be displayed
   */
  private void viewLieuDit(LieuDitProxy entity) {

    /* display instance information */
    setTitle(NLS.constants().lieuDit_name() + ": " + EpicamRenderer.get().getDisplayValue(entity));
    setMetaData((ImogBeanProxy) entity);

    /* push the instance to the editor in view mode */
    request = requestFactory.lieuDitRequest();
    current = request.edit(entity);
    if (current.getDescription() == null) {
      LocalizedTextProxy newDescription = request.create(LocalizedTextProxy.class);
      current.setDescription(newDescription);
    }
    if (current.getCoordonnees() == null) {
      GeoFieldProxy newCoordonnees = request.create(GeoFieldProxy.class);
      current.setCoordonnees(newCoordonnees);
    }

    editor.setEditedValue(current);

    /* set request context for list editor operations */
    editor.setRequestContextForListEditors(request);

    editorDriver.edit(current, request);
    editor.setEdited(false);

    /* update field widgets in editor */
    editor.computeVisibility(null, true);

    /* display edit button */
    if (AccessManager.canEditLieuDit()) setModifiable(true);

    showGlassPanel = false;
    EpicamEntryPoint.GP.hide();
  }
コード例 #7
0
  /**
   * Display the current instance of TransfertReference in editor
   *
   * @param entity the TransfertReferenceProxy to be displayed
   */
  private void viewTransfertReference(TransfertReferenceProxy entity) {

    /* display instance information */
    setTitle(
        NLS.constants().transfertReference_name()
            + ": "
            + EpicamRenderer.get().getDisplayValue(entity));
    setMetaData((ImogBeanProxy) entity);

    /* push the instance to the editor in view mode */
    request = requestFactory.transfertReferenceRequest();
    current = request.edit(entity);

    editor.setEditedValue(current);

    /* set request context for list editor operations */
    editor.setRequestContextForListEditors(request);

    editorDriver.edit(current, request);
    editor.setEdited(false);

    /* update field widgets in editor */
    editor.computeVisibility(null, true);

    /* display edit button */
    if (AccessManager.canEditTransfertReference()) setModifiable(true);

    showGlassPanel = false;
    EpicamEntryPoint.GP.hide();
  }
コード例 #8
0
  /** 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());
    }
  }
コード例 #9
0
  /** Configures the visibility of the fields in view mode depending on the user privileges */
  public void setFieldReadAccess() {

    if (!AccessManager.canReadPatientIdentification())
      castb_patient_identifiantFilterBox.setVisible(false);
    if (!AccessManager.canReadPatientIdentification()) castb_patient_nomFilterBox.setVisible(false);

    if (!AccessManager.canReadExamenATBExamen()) {
      dateExamenBeforeFilterBox.setVisible(false);
      dateExamenAfterFilterBox.setVisible(false);
    }

    if (!AccessManager.canReadExamenATBExamen()) raisonDepistageFilterBox.setVisible(false);

    if (!AccessManager.canReadExamenATBExamen()) resultatFilterBox.setVisible(false);

    if (!AccessManager.isAdmin()) deletedEntityBoxFilterBox.setVisible(false);
  }
コード例 #10
0
  /** @param eventBus */
  private void setListActions() {

    listButton = new PopupButton(BaseNLS.constants().button_list());

    if (AccessManager.canDirectAccessPatient() && AccessManager.canReadPatient()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/patient/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().patient_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessCasTuberculose() && AccessManager.canReadCasTuberculose()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/castuberculose/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().casTuberculose_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessTransfertReference()
        && AccessManager.canReadTransfertReference()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/transfertreference/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(),
              NLS.constants().transfertReference_name_plur(),
              command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessRegime() && AccessManager.canReadRegime()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/regime/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().regime_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessExamenATB() && AccessManager.canReadExamenATB()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/examenatb/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().examenATB_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessExamenBiologique()
        && AccessManager.canReadExamenBiologique()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/examenbiologique/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().examenBiologique_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessExamenMicroscopie()
        && AccessManager.canReadExamenMicroscopie()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/examenmicroscopie/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().examenMicroscopie_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessExamenSerologie() && AccessManager.canReadExamenSerologie()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/examenserologie/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().examenSerologie_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessLot() && AccessManager.canReadLot()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/lot/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().lot_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessCommande() && AccessManager.canReadCommande()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/commande/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().commande_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessReception() && AccessManager.canReadReception()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/reception/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().reception_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessRavitaillement() && AccessManager.canReadRavitaillement()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/ravitaillement/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().ravitaillement_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessInventaire() && AccessManager.canReadInventaire()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/inventaire/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().inventaire_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessHorsUsage() && AccessManager.canReadHorsUsage()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/horsusage/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().horsUsage_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessEntreeLot() && AccessManager.canReadEntreeLot()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/entreelot/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().entreeLot_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessSortieLot() && AccessManager.canReadSortieLot()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/sortielot/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().sortieLot_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessSmsPredefini() && AccessManager.canReadSmsPredefini()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/smspredefini/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().smsPredefini_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessOutBox() && AccessManager.canReadOutBox()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/outbox/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().outBox_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessFormation() && AccessManager.canReadFormation()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/formation/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().formation_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessTutoriel() && AccessManager.canReadTutoriel()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/tutoriel/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().tutoriel_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessRegion() && AccessManager.canReadRegion()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/region/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().region_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessDistrictSante() && AccessManager.canReadDistrictSante()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/districtsante/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().districtSante_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessCentreDiagTrait() && AccessManager.canReadCentreDiagTrait()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/centrediagtrait/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().centreDiagTrait_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessLaboratoireReference()
        && AccessManager.canReadLaboratoireReference()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/laboratoirereference/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(),
              NLS.constants().laboratoireReference_name_plur(),
              command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessLieuDit() && AccessManager.canReadLieuDit()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/lieudit/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().lieuDit_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessMedicament() && AccessManager.canReadMedicament()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/medicament/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().medicament_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessIntrant() && AccessManager.canReadIntrant()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/intrant/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().intrant_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessPersonnel() && AccessManager.canReadPersonnel()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/personnel/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().personnel_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessDepartPersonnel() && AccessManager.canReadDepartPersonnel()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/departpersonnel/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().departPersonnel_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessArriveePersonnel()
        && AccessManager.canReadArriveePersonnel()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/arriveepersonnel/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().arriveePersonnel_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessUtilisateur() && AccessManager.canReadUtilisateur()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/utilisateur/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().utilisateur_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    if (AccessManager.canDirectAccessQualification() && AccessManager.canReadQualification()) {

      Command command =
          new Command() {
            public void execute() {
              LocalSession.get().setSearchCriterions(null, null);
              History.newItem(TokenHelper.TK_LIST + "/qualification/", true);
            }
          };
      SimpleMenuItem item =
          new SimpleMenuItem(
              requestFactory.getEventBus(), NLS.constants().qualification_name_plur(), command);
      listButton.addPopupPanelContent(item);
    }

    wrapperPanel.addHeaderWidget(listButton);
  }
コード例 #11
0
  /** Configures the visibility of the fields in edit mode depending on the user privileges */
  private void setFieldEditAccess() {

    /* Description section widgets visibility */
    if (!AccessManager.canEditCasIndexDescription()) descriptionSection.setVisible(false);
  }