Package org.springmodules.xt.examples.mvc.form

Examples of org.springmodules.xt.examples.mvc.form.EmployeeView


        OfficeView view = (OfficeView) command;
        Collection<EmployeeView> empsList = view.getSelectableEmployees();
        IOffice office = (IOffice) this.introductor.getTarget(view);
       
        for (Iterator it = empsList.iterator(); it.hasNext();) {
            EmployeeView emp = (EmployeeView) it.next();
            if (emp.getSelected() != null && emp.getSelected().booleanValue() == true) {
                it.remove();
            }
        }
        try {
            store.addOffice(office);
View Full Code Here


       
        return result;
    }

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        EmployeeView view = (EmployeeView) command;
        IOffice office = view.getOffice();
       
        if (store.getEmployee(view.getMatriculationCode()) != null) {
            errors.rejectValue("matriculationCode", EmployeeErrorCodes.DUPLICATED_CODE, "Duplicated Matriculation Code!");
            return this.showForm(request, response, errors);
        }
        if (office == null) {
            errors.rejectValue("office", OfficeErrorCodes.NOT_FOUND, "No office found!");
View Full Code Here

TOP

Related Classes of org.springmodules.xt.examples.mvc.form.EmployeeView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.