Search in sources :

Example 1 with CtrCandFormationWindow

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

the class FormationController method editNewFormation.

/**
 * Ouvre une fenêtre d'édition d'un nouveau formation.
 */
public void editNewFormation(final SecurityCtrCandFonc securityCtrCand) {
    final CentreCandidature ctrCand = securityCtrCand.getCtrCand();
    final Formation form = new Formation(userController.getCurrentUserLogin());
    final I18n i18n = new I18n(i18nController.getTypeTraduction(NomenclatureUtils.TYP_TRAD_FORM_INFO_COMP));
    if (ctrCand.getInfoCompCtrCand() != null) {
        final I18nTraduction trad = new I18nTraduction(ctrCand.getInfoCompCtrCand(), i18n, cacheController.getLangueDefault());
        final List<I18nTraduction> i18nTraductions = new ArrayList<>();
        i18nTraductions.add(trad);
        i18n.setI18nTraductions(i18nTraductions);
    }
    form.setI18nInfoCompForm(i18n);
    form.setTemDematForm(ctrCand.getTemDematCtrCand());
    form.setDatConfirmForm(ctrCand.getDatConfirmCtrCand());
    form.setDelaiConfirmForm(ctrCand.getDelaiConfirmCtrCand());
    form.setDatConfirmListCompForm(ctrCand.getDatConfirmListCompCtrCand());
    form.setDelaiConfirmListCompForm(ctrCand.getDelaiConfirmListCompCtrCand());
    form.setDatDebDepotForm(ctrCand.getDatDebDepotCtrCand());
    form.setDatAnalyseForm(ctrCand.getDatAnalyseCtrCand());
    form.setDatFinDepotForm(ctrCand.getDatFinDepotCtrCand());
    form.setDatJuryForm(ctrCand.getDatJuryCtrCand());
    form.setDatPubliForm(ctrCand.getDatPubliCtrCand());
    form.setDatRetourForm(ctrCand.getDatRetourCtrCand());
    form.setTemListCompForm(ctrCand.getTemListCompCtrCand());
    form.setTypeDecisionFav(ctrCand.getTypeDecisionFav());
    UI.getCurrent().addWindow(new CtrCandFormationWindow(form, securityCtrCand));
}
Also used : CtrCandFormationWindow(fr.univlorraine.ecandidat.views.windows.CtrCandFormationWindow) I18nTraduction(fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction) CentreCandidature(fr.univlorraine.ecandidat.entities.ecandidat.CentreCandidature) SecurityCentreCandidature(fr.univlorraine.ecandidat.services.security.SecurityCentreCandidature) ArrayList(java.util.ArrayList) Formation(fr.univlorraine.ecandidat.entities.ecandidat.Formation) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Example 2 with CtrCandFormationWindow

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

the class FormationController method editFormation.

/**
 * Ouvre une fenêtre d'édition de formation.
 * @param formation
 * @param securityCtrCand
 */
public void editFormation(final Formation formation, final SecurityCtrCandFonc securityCtrCand) {
    Assert.notNull(formation, applicationContext.getMessage("assert.notNull", null, UI.getCurrent().getLocale()));
    /* Verrou */
    if (!lockController.getLockOrNotify(formation, null)) {
        return;
    }
    if (formation.getI18nInfoCompForm() == null) {
        formation.setI18nInfoCompForm(new I18n(i18nController.getTypeTraduction(NomenclatureUtils.TYP_TRAD_FORM_INFO_COMP)));
    }
    final CtrCandFormationWindow window = new CtrCandFormationWindow(formation, securityCtrCand);
    window.addCloseListener(e -> lockController.releaseLock(formation));
    UI.getCurrent().addWindow(window);
}
Also used : CtrCandFormationWindow(fr.univlorraine.ecandidat.views.windows.CtrCandFormationWindow) I18n(fr.univlorraine.ecandidat.entities.ecandidat.I18n)

Aggregations

I18n (fr.univlorraine.ecandidat.entities.ecandidat.I18n)2 CtrCandFormationWindow (fr.univlorraine.ecandidat.views.windows.CtrCandFormationWindow)2 CentreCandidature (fr.univlorraine.ecandidat.entities.ecandidat.CentreCandidature)1 Formation (fr.univlorraine.ecandidat.entities.ecandidat.Formation)1 I18nTraduction (fr.univlorraine.ecandidat.entities.ecandidat.I18nTraduction)1 SecurityCentreCandidature (fr.univlorraine.ecandidat.services.security.SecurityCentreCandidature)1 ArrayList (java.util.ArrayList)1