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

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


public class ListEmployeesController extends EnhancedSimpleFormController {
   
    private MemoryRepository store;

    protected Object formBackingObject(HttpServletRequest request) throws Exception {
        return new EmployeesListForm();
    }
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

public class ListEmployeesHandler extends AbstractAjaxHandler {
   
    private MemoryRepository store;
   
    public AjaxResponse listEmployees(AjaxSubmitEvent event) {
        EmployeesListForm form = (EmployeesListForm) event.getCommandObject();
        Map model = event.getModel();
        IOffice office = form.getOffice();
        Collection<IEmployee> employees = (Collection) model.get("employees");
       
        // Create the simple text message:
        SimpleText message = new SimpleText(new StringBuilder("Selected office: ").append(office.getName()).toString());
        // Create an ajax action for setting the message and hi:
View Full Code Here

TOP

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

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.