Package org.springmodules.xt.examples.domain

Examples of org.springmodules.xt.examples.domain.Office


public class InsertOfficeController extends EnhancedSimpleFormController {
   
    private MemoryRepository store;
   
    protected Object formBackingObject(HttpServletRequest request) throws Exception {
        return new Office();
    }
View Full Code Here


    private MemoryRepository store;

    protected Object formBackingObject(HttpServletRequest request) throws Exception {
        String officeId = request.getParameter("officeId");
        if (officeId == null) {
            return new Office();
        }
        else {
            return this.store.getOffice(officeId);
        }
    }
View Full Code Here

       
        return result;
    }

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        Office office = (Office) command;
       
        try {
            this.store.addOffice(office);
        }
        catch(BusinessException ex) {
View Full Code Here

        return result;
    }

    protected ModelAndView onSubmit(Object command, BindException errors) throws Exception {
        EmployeesListForm form = (EmployeesListForm) command;
        Office office = form.getOffice();
        Collection<IEmployee> employees = store.getEmployeesByOffice(office);
        Map model = new HashMap(3);
       
        model.put("employees", employees);
       
View Full Code Here

       
        return result;
    }

    protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception {
        Office office = (Office) command;
       
        try {
            this.store.addOffice(office);
        }
        catch(BusinessException ex) {
View Full Code Here

TOP

Related Classes of org.springmodules.xt.examples.domain.Office

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.