Search in sources :

Example 1 with TypeDecisionWindow

use of fr.univlorraine.ecandidat.views.windows.TypeDecisionWindow in project esup-ecandidat by EsupPortail.

the class TypeDecisionController method editNewTypeDecision.

/**
 * Ouvre une fenêtre d'édition d'un nouveau typeDecision.
 */
public void editNewTypeDecision(final CentreCandidature ctrCand) {
    TypeDecision typ = new TypeDecision(userController.getCurrentUserLogin());
    typ.setTesTypDec(true);
    typ.setCentreCandidature(ctrCand);
    typ.setI18nLibTypDec(new I18n(i18nController.getTypeTraduction(NomenclatureUtils.TYP_TRAD_TYP_DEC_LIB)));
    UI.getCurrent().addWindow(new TypeDecisionWindow(typ, ctrCand));
}
Also used : TypeDecision(fr.univlorraine.ecandidat.entities.ecandidat.TypeDecision) TypeDecisionWindow(fr.univlorraine.ecandidat.views.windows.TypeDecisionWindow) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Example 2 with TypeDecisionWindow

use of fr.univlorraine.ecandidat.views.windows.TypeDecisionWindow in project esup-ecandidat by EsupPortail.

the class TypeDecisionController method editTypeDecision.

/**
 * Ouvre une fenêtre d'édition de typeDecision.
 *
 * @param typeDecision
 */
public void editTypeDecision(final TypeDecision typeDecision, final CentreCandidature ctrCand) {
    Assert.notNull(typeDecision, applicationContext.getMessage("assert.notNull", null, UI.getCurrent().getLocale()));
    /* Verrou */
    if (!lockController.getLockOrNotify(typeDecision, null)) {
        return;
    }
    TypeDecisionWindow window = new TypeDecisionWindow(typeDecision, ctrCand);
    window.addCloseListener(e -> lockController.releaseLock(typeDecision));
    UI.getCurrent().addWindow(window);
}
Also used : TypeDecisionWindow(fr.univlorraine.ecandidat.views.windows.TypeDecisionWindow)

Aggregations

TypeDecisionWindow (fr.univlorraine.ecandidat.views.windows.TypeDecisionWindow)2 I18n (fr.univlorraine.ecandidat.entities.ecandidat.I18n)1 TypeDecision (fr.univlorraine.ecandidat.entities.ecandidat.TypeDecision)1