Search in sources :

Example 1 with ScolCentreCandidatureWindow

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

the class CentreCandidatureController method editNewCentreCandidature.

/**
 * Ouvre une fenêtre d'édition d'un nouveau centreCandidature.
 */
public void editNewCentreCandidature() {
    CentreCandidature centreCandidature = new CentreCandidature(userController.getCurrentUserLogin(), typeDecisionController.getTypeDecisionFavDefault(), parametreController.getNbVoeuxMax(), false);
    ScolCentreCandidatureWindow window = new ScolCentreCandidatureWindow(centreCandidature, true);
    window.addRecordCtrCandWindowListener(e -> {
        if (userController.getCentreCandidature() == null) {
            userController.setCentreCandidature(e);
            MainUI.getCurrent().buildMenuCtrCand();
        }
    });
    UI.getCurrent().addWindow(window);
}
Also used : CentreCandidature(fr.univlorraine.ecandidat.entities.ecandidat.CentreCandidature) SecurityCentreCandidature(fr.univlorraine.ecandidat.services.security.SecurityCentreCandidature) ScolCentreCandidatureWindow(fr.univlorraine.ecandidat.views.windows.ScolCentreCandidatureWindow)

Example 2 with ScolCentreCandidatureWindow

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

the class CentreCandidatureController method editCentreCandidature.

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

Aggregations

ScolCentreCandidatureWindow (fr.univlorraine.ecandidat.views.windows.ScolCentreCandidatureWindow)2 CentreCandidature (fr.univlorraine.ecandidat.entities.ecandidat.CentreCandidature)1 SecurityCentreCandidature (fr.univlorraine.ecandidat.services.security.SecurityCentreCandidature)1