use of org.mifos.customers.personnel.struts.actionforms.PersonnelNoteActionForm in project head by mifos.
the class PersonnelNoteAction method load.
@TransactionDemarcate(joinToken = true)
public ActionForward load(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
clearActionForm(form);
PersonnelNoteActionForm actionForm = (PersonnelNoteActionForm) form;
Short personnelId = getShortValue(actionForm.getPersonnelId());
PersonnelBO personnelBO = this.personnelDao.findPersonnelById(personnelId);
actionForm.setPersonnelName(personnelBO.getDisplayName());
actionForm.setOfficeName(personnelBO.getOffice().getOfficeName());
actionForm.setGlobalPersonnelNum(personnelBO.getGlobalPersonnelNum());
actionForm.setCommentDate(DateUtils.getCurrentDate(getUserContext(request).getPreferredLocale()));
SessionUtils.removeAttribute(Constants.BUSINESS_KEY, request);
SessionUtils.setAttribute(Constants.BUSINESS_KEY, personnelBO, request);
return mapping.findForward(ActionForwards.load_success.toString());
}
use of org.mifos.customers.personnel.struts.actionforms.PersonnelNoteActionForm in project head by mifos.
the class PersonnelNoteAction method create.
@CloseSession
@TransactionDemarcate(validateAndResetToken = true)
public ActionForward create(ActionMapping mapping, ActionForm form, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
PersonnelNoteActionForm actionForm = (PersonnelNoteActionForm) form;
Short personnelId = getShortValue(actionForm.getPersonnelId());
this.centerServiceFacade.addNoteToPersonnel(personnelId, actionForm.getComment());
return mapping.findForward(ActionForwards.create_success.toString());
}
Aggregations