use of org.apache.struts.action.ActionErrors in project head by mifos.
the class MultipleGeneralLedgerActionForm method validate.
@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
logger.debug("GeneralLedgerActionForm.validate");
// request.setAttribute(Constants.CURRENTFLOWKEY,
// request.getParameter(Constants.CURRENTFLOWKEY));
ActionErrors errors = new ActionErrors();
if (request.getParameter(SimpleAccountingConstants.METHOD).equalsIgnoreCase(SimpleAccountingConstants.PREVIEW)) {
return mandatoryCheck(getUserContext(request));
}
return errors;
}
use of org.apache.struts.action.ActionErrors in project head by mifos.
the class OpenBalanceActionForm method validate.
@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
logger.debug("OpenBalanceActionForm.validate");
// request.setAttribute(Constants.CURRENTFLOWKEY, request.getParameter(Constants.CURRENTFLOWKEY));
ActionErrors errors = new ActionErrors();
if (request.getParameter(SimpleAccountingConstants.METHOD).equalsIgnoreCase(SimpleAccountingConstants.PREVIEW)) {
return mandatoryCheck(getUserContext(request));
}
return errors;
}
use of org.apache.struts.action.ActionErrors in project head by mifos.
the class PersonnelNoteActionForm method validate.
@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
String methodCalled = request.getParameter(Methods.method.toString());
ActionErrors errors = null;
if (null != methodCalled) {
if (Methods.preview.toString().equals(methodCalled)) {
errors = handlePreviewValidations(request, errors);
}
}
if (null != errors && !errors.isEmpty()) {
request.setAttribute(Globals.ERROR_KEY, errors);
request.setAttribute("methodCalled", methodCalled);
}
return errors;
}
use of org.apache.struts.action.ActionErrors in project head by mifos.
the class AddGroupMembershipForm method validate.
@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
String method = request.getParameter(Methods.method.toString());
if (method.equals(Methods.updateParent.toString())) {
}
if (!method.equals(Methods.validate.toString())) {
request.setAttribute(GroupConstants.METHODCALLED, method);
}
return errors;
}
use of org.apache.struts.action.ActionErrors in project head by mifos.
the class GroupTransferActionForm method validate.
@Override
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
String method = request.getParameter(Methods.method.toString());
if (method.equals(Methods.removeGroupMemberShip.toString())) {
errors.add(super.validate(mapping, request));
if (StringUtils.isBlank(getAssignedLoanOfficerId())) {
if (isActive == Constants.YES) {
errors.add(GroupConstants.ASSIGNED_LOAN_OFFICER_REQUIRED, new ActionMessage(GroupConstants.ASSIGNED_LOAN_OFFICER_REQUIRED));
}
}
}
if (!method.equals(Methods.validate.toString())) {
request.setAttribute(GroupConstants.METHODCALLED, method);
}
return errors;
}
Aggregations