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));
}
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);
}
Aggregations